Page 1 of 1

Leostick Tunes

Posted: Mon Jan 16, 2012 3:27 am
by smarthall
I've put up a hacked version of one of the Tone library examples that works on the LeoStick using software PWM.

You can find it on gist here: https://gist.github.com/1618800

Re: Leostick Tunes

Posted: Mon Jan 16, 2012 11:27 am
by marc
That was so cool today in the miniconf hearing all the LeoStick Tunes fire up and play!
Have had a few people ask about this already and pointed them to the code, looks like a bunch of others are having a great time playing with theirs too :)
Cheers,
Marc

Re: Leostick Tunes

Posted: Mon Jan 16, 2012 12:33 pm
by smarthall
I made a video for anyone watching who isn't at the conference and unable to experience the joy of programming a little USB key to play a tune. You can find it at: http://yfrog.com/n2p80z

Re: Leostick Tunes

Posted: Mon Jan 23, 2012 1:06 am
by jnewbigin
The code in git (revision 98c987) has a bug. It does not convert the frequency into a delay duration.
Needs
danDur = 1000000 / danFreq;
...
delayMicroseconds(danDur);
...
delayMicroseconds(danDur);

Then it works.

Re: Leostick Tunes

Posted: Sat Feb 11, 2012 3:47 pm
by marc
Thanks! I've had a great time playing with this :)

The latest version is here, with the fix too: https://gist.github.com/1800871