This project is a device to control playback of pre-recorded music. Based on a pre-built playback engine written in Javascript, this device sends asynchronous serial messages to a computer to play the music. The playback device will echo your message back to you as an acknowledgement message when it executes your command. The device has the following features:

  • It can be operable by a user who cannot see the device.
  • The user should get an acknowledgement when they activate any control.
  • Start or stop the playback of a track (start plays track from the beginning).
  • Pause or resume playback of a track (resume plays track from last position stopped).
  • Skip ahead one track in the playlist.
  • Skip back one track in the playlist.
  • Fast-forward the current track (double speed of the track).
  • Skip to a random track in the playlist.


The general idea is to build a controller in a familar setting for new users (suppose to be blind) and it is easy to learn the control system. There are three types of control interaction here based on my understanding of use frequency: 1) An rotary encoder serves as a main controller to turn on/off the device with a sound indication (click) and switch songs (rotate). This should be the main control that the user use the most. 2) A push button to pause the current song; 3) Another push button to shuffle and play a random song.



The circuit includes a Arduino MRK1000 as micro-controller, one rotary encoder and two push button as switches. There is no LED lights as indication, since I add a wav. file into previous music player JavaScript file as an indication tone.The circuit includes a half breadboard and a mini board stacked on top to make push buttons and rotary encoder panel on the same height.



Since it is designed for blind users, I put all control interface on a single surface where you can reach all with one finger, and hold the box with one hand very easily. I used wood as exterior material to create a warmer and softer touch for the user. Ideally all the buttons and panel should be flush with the top surface to create a tight, durable, and seamless housing. cut_021517


// turn off hardware interrupts. On an M0-based board, you can skip this line
// because most of the IO pins on those boards have interrupts

Encoder encoder(6, 7); // initialize the encoder on pins 6 and 7
long lastPosition = 0; // last position of the knob
int lastButtonState = HIGH; // last state of the button
int fadeState = 0; // calculated level for the LED (0-255)
boolean onOffState = false; // whether the light is on or off

int pausePin = A0; // FSR is connected to analog 0
int pauseState = 0; // variable for reading the pushbutton status

const int shufflePin = A1; // the number of the pushbutton pin
int shuffleState = 0; // variable for reading the pushbutton status

void setup() {
Serial.begin(9600); // initialize serial communication
pinMode(2, INPUT_PULLUP); // pushbutton on pin 2
pinMode(pausePin, INPUT);
pinMode(shufflePin, INPUT);

void loop() {
// this section reads the sensors and determines if they’ve changed:
long encoderPos =; // read encoder
// calculate change in encoder:
int encoderChange = encoderPos – lastPosition;
lastPosition = encoderPos; // save current position for next time

int buttonState = digitalRead(2); // read pushbutton
if (buttonState != lastButtonState) { // if button has changed
delay(3); // wait a few ms (debounce delay)
if (buttonState == HIGH) { // if button is pressed
onOffState = !onOffState; // change on-off state¨
lastButtonState = buttonState; // save current button state for next time

// this section sets the light level:
if (onOffState == true) { // if the light should be on
if (encoderChange != 0) { // if there was a change in the encoder
//fadeState = fadeState + encoderChange; // change the fadeState
//fadeState = constrain(fadeState, 3, 4); // constrain it to 0-255
if (encoderChange > 0) {
Serial.println(“NEXT SONG”);
if (encoderChange < 0) {
Serial.println(“PREVIOUS SONG”);
pauseState = digitalRead(pausePin);
if (pauseState == HIGH) {

shuffleState = digitalRead(shufflePin);
if (shuffleState == HIGH) {