3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Fuse Beads NES Controller

Step 5Example: Control iTunes with your fuse beads NES

Example: Control iTunes with your fuse beads NES
Here is an example of application for the controller: a "remote controller" for iTunes. You can change track and volume (for Mac only) using Applescript commands sent through Arduino.

1. Download the following application from Tinker.it to execute Applescript commands that can control iTunes when calling certain characters:
http://tinker.it/now/2007/04/26/control-your-mac-from-arduino-the-easy-way/
(direct link: http://www.tinker.it/files/asproxy02.dmg )
Make sure to choose the right port.

2. Modify the previous Arduino code in the following way in order to send characters to the app when pressing the buttons:

int CrossButton = 3;
int RedButtonL = 5;
int RedButtonR = 8;
int val1 = 1;
int val2 = 1;
int val3 = 1;
int state1 = 1;
int state2 = 1;
int state3 = 1;

void setup() {
pinMode(CrossButton, INPUT);
pinMode(RedButtonL, INPUT);
pinMode(RedButtonR, INPUT);
digitalWrite(CrossButton, HIGH);
digitalWrite(RedButtonL, HIGH);
digitalWrite(RedButtonR, HIGH);
Serial.begin(9600);
}

void loop() {
val1 = digitalRead(CrossButton);
if (val1 != state1 && val1 == 0){Serial.print("C");}
if (val1 != state1){state1 = val1;}

val2 = digitalRead(RedButtonL);
if (val2 != state2 && val2 == 0){Serial.print("B");}
if (val2 != state2){state2 = val2;}

val3 = digitalRead(RedButtonR);
if (val3 != state3 && val3 == 0){Serial.print("A");}
if (val3 != state3){state3 = val3;}

delay(10);
}

3. Use the following commands in the app :
Change track (cross button):
C tell application iTunes
play next track
end tell

Volume up / down for red buttons B and A (see http://bbs.macscripter.net/viewtopic.php?pid=103916 )
A tell application "iTunes"
set currentVolume to sound volume
set sound volume to currentVolume + 10
end tell
B tell application "iTunes"
set currentVolume to sound volume
set sound volume to currentVolume - 10
end tell

Press start in the applescript application.... Done! Now you have a fuse beads NES controller that can control iTunes!
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Aug 10, 2010. 4:03 AMxUNMERITEDx says:
Rawrrrr<3 Please, don't stop talkin' dirty! ^. ^'' Like your skills =D Have a great day! -Michel Merx.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
3
Followers
1
Author:Lalya