Remove these ads by
Signing UpStep 1: What you will need
-an arduino uno / clone or an ATtiny 45 and a way to program it (i.e. a programming shield for the arduino)
-two pontentiometers (value does not really matter)
-a buttonswitch (the original project called for momentary but I used a push on push off switch so I wouldn't have to hold it)
-two LEDs and cases
-resistors to go with the LEDs (i.e 220 ohm)
-spst toggle switch
-1/8" audio jack
-DC female power jack
-project box












































Visit Our Store »
Go Pro Today »




This actually will play from 0-62 which is 63 notes. I could tell because I made a pseudo-funky-drumbeat with it with this sequence:
int steps[] = {300,100,100,100,500,100,100,100,
100,100,300,100,500,100,100,100,
300,100,300,100,500,100,100,100,
100,1500,100,100,500,100,100,100,
300,100,100,100,500,100,100,100,
100,100,300,100,500,100,100,100,
300,100,100,300,500,100,100,100,
100,1500,300,100,500,100,100,500};
So, to get it to play an even 64 notes, you can do <=63 or <64. I used this:
for (int i=0; i<64; i++)
And it works as it should. Nice 'ible though! Thanks for sharing this! Remember seeing this Luna Mod and wanted to make it before, now that I have tons of spare parts lying around it is finally mine. =D Now to just make a step sequencer that will work with it. Add a button to go into step mode, and a button to go inbetween the steps, then your momentary can play the current note, hmm, maybe I will work on this for fun today.
Do you think there are any changes made to the values in the code when using it for the ATtiny rather than the Arduino? I'm also using a 1/4" jack for audio output rather than 3.5mm if that makes any difference. Let me know if you have any thoughts1
Because I did not understand the scheme.
thank you. (sorry about my english).
I LOVE IT
one problem im having though. the led blinks regularly when the speaker is not plugged in, but when i plug the speaker in it starts spazzing out.
any idea why?
also just to be sure, when using an atmega 45 what pins should I define in the code?
Thanks!
When you say atmega 45 I assume you mean ATtiny45. For that you can use pretty much any pin you want for the different components just as long as the speaker is one of the pwm pins. I included a schematic showing which pins to use on step2. keep in mind that the pin numbers you define in the code are not the same pins you attach everything to. I attached the speaker to pin 0, the button to pin 1, the LED to pin 2 and the two pots to pins 3 and 4. define everything in the code using those pins, but look on the schematic for how to connect everything.
Great project. When I saw the original LunaMod I hoped someone would do it with the arduino.
Thanks!