Feeling a bit left out because he didn’t have a PICAXE on hand, [Rob Miles] decided to port the Luna Mod code so that it would work on an AVR chip. He chose to build his around an ATtiny45, but also mentions that this is Arduino compatible.
This case layout is a bit different from the original Make version, but we like this look just a bit better. It might not satisfy your need for that hipster looking enclosure, but the repurposed macadamia nut box looks seems it was built for this purpose. Take a look as the video after the break to see the final product and hear it spewing newly composed cacophony. [Rob] is sharing the sketch as a dropbox file but we’ve also included our own hosted link after the break in case is stops working.
[youtube=http://www.youtube.com/watch?v=sRE7yiReohM&w=470]
Love it!
Me too, Like the auduino project some years ago.
This is about as much fun as you can have for $5. The kids love it.
I thought just about all code for AVR was “Arduino compatible”. Am I wrong in this assumption?
@bandwagon
yes it should work on arduino
Not all, for example the attiny85 has a high frequency PWM channel that the atmega168 has not. So some code is not compatible.
Well, you can have that problem whenever you’re going from one AVR mcu to another. I just mean in general; it’s not like the machine code is different.
I programmed the attiny via the Arduino IDE and ArduinoISP so they’re even more the same.
Sounds great. A question on the code though – What am I missing? I can’t see a main(), and some of the functions are not defined or provided – are they Arduino library functions? I intend to implement this on an avr but not an arduino, so should I just work out my own functions for those not given?
I started pulling some electronics together last night to build one of these… got it mostly done except for the brain and power source. It looks freaking awexome so far, unlike any Luna Mod I’ve ever seen.
I think I’ll take a stab at making the code even better ;-)
@Alan – This link (same as above) has Arduino IDE compatible code that doesn’t have a “main”. The PDE file compiles for me just fine:
http://dl.dropbox.com/u/32611590/Arduino/Sketches/lunaMod45remix.pde
The sketch was written directly in the Arduino IDE so the layout is a little different than you may be used to but I didn’t use any libraries or anything fancy so it should be easy to modify/translate.
Someone smarter could definitely clean the code up a bit as well. If you look at Paul Badger’s synth code there is a ton of inspiration for tweaking the output.
Well I got my Arduino programmed last night with the lunaMod45remix sketch, and it was a ton of fun. Now I just need to finish the construction.
The code is infinitely tweakable. I started tweaking and couldn’t stop. Then I went to compare the port to the original picaxe basic code. There are definite differences in the way the code runs, which I think makes the sound much different than the original Luna Mod. I came up with some variations that sounded wicked cool, so I’m thinking of making something that will handle presets, among other options. I’ll update when I’m further along.