Arduino drum machine.

code and instructions


How to use a USB MIDI device to control +5V CV synths and other full DIN MIDI devices.


Code and instructions.

MAMA (Machine for Ambient Music with Arduino)

This is my first real Arduino-project, created in the summer of 2014.

The goal was to try some simple algorithmic composing, where the environment would have an impact on the composition. To create a box that creates ambient music that you just plug in and leave there, letting it create music that always changes depending on the time of day, whether someone is in the room etc.

Although the composition algorithm is pretty simple, it can function as a framework for further experiments.

One of the main accomplishments was the creation of a sequencer function in Arduino, where I handle and sync 6 different voices.


  • Arduino Uno
  • Sparkfun Musical Instrument Shield (MIS)
  • A real time clock (RTC) connected using the I2C protocol and the Wire library
  • A PIR (infrared) motion sensor


Until I make some graphics, this is how you connect the stuff to the Arduino:

MIS: D3 and D4 connects to D3 and D4 on the Arduino. +5V and GND.

RTC: SDA to A4, and SCL to A5. VCC to +5V, GND to GND.

PIR: - Middle pin to D2. +5V and GND.

MAMA schematics.

MAMA built into a box:

MAMA in a black box.


Download the Arduino code for the MAMA.

Robot With No Name

This is my first robot made with Arduino summer 2014.


Watch it in action on YouTube.

Together with Martin Blom this was made into a 7 week school project at the Bild & form school in Gothenburg. You can find a Swedish manual of the project.

Some nice resources:


  • simple robot kit from ebay (chassis, two wheels with motors, battery holder for 4xAA)
  • Arduino Uno
  • H-bridge: L293D        
  • 9V battery snap for Arduino
  • ultrasound distance sensor SR03
  • (micro) servo motor
  • 100µF (electrolytic) capacitor
  • breadboard
  • wires
  • glue, tape, etc


This is how you control the motor:

The SR03 has four lines:

  • VCC -> Arduino +5V
  • Trig -> D19 (Analog A5)
  • Echo -> D18 (Analog A4)
  • GND -> Arduino GND

The servo has one control line:

  • Red -> Arduino +5V
  • White (control) -> D10
  • Black -> Arduino GND

Place the capacitor across the +5V and GND of the servo to smooth out the voltage.


Download the Arduino code for the robot.

Adding Bluetooth control

Here is a simple document explaining how to add Bluetooth control to the robot. Complete code with Bluetooth support.


Please contact me if you have any questions! Or use the form.