[solved] tone() not working on Leostick V2

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
farrioth
Posts:2
Joined:Sun Aug 04, 2013 1:46 am
[solved] tone() not working on Leostick V2

Post by farrioth » Sun Aug 04, 2013 2:10 am

I just purchased a new Leostick, which comes with the V2 bootloader (according to how fast the LED blinks). HID (keyboard, at least) works, which suggests that this is indeed V2. However, the tone() function still locks the board up. I have tried the toneMelody demo (changing the pin to 11) and a minimal program which just calls tone(). Both lock up. The USB RX LED (Green) also lights up when tone() locks the board up.

Has anyone else had this problem?
Last edited by farrioth on Fri Aug 09, 2013 11:11 am, edited 1 time in total.

lsfanboi
Posts:7
Joined:Fri Aug 02, 2013 12:28 am

Re: tone() not working on Leostick V2

Post by lsfanboi » Sun Aug 04, 2013 6:08 am

Yes I have the same problem. There was another post on this forum about tone locking up version 1 but it appears to be the same for v2 as well. In order to work around I had to use some code I cut and pasted from somewhere to manually oscillate pin 11 at the desired frequency. If I can find the link I will post.

drake250
Posts:19
Joined:Mon May 28, 2012 1:17 pm
Location:Adelaide

Re: tone() not working on Leostick V2

Post by drake250 » Sun Aug 04, 2013 10:13 am

I had that same issue recently after upgrading both my v1 Leos to v2, but that turned out to be out of date files in my hardware folder - I've since cleaned it up and tone() works as it should. (I tested it with toneMelody too, and it worked once I reinstalled everything and uploaded again)

Maybe double check that you're using the latest Leostick profile, and there aren't any older files hanging around from a previous version.

angusgr
Freetronics Staff
Freetronics Staff
Posts:853
Joined:Tue Apr 09, 2013 11:19 pm
Location:Melbourne, Australia
Contact:

Re: tone() not working on Leostick V2

Post by angusgr » Mon Aug 05, 2013 2:43 am

drake250 wrote:I had that same issue recently after upgrading both my v1 Leos to v2, but that turned out to be out of date files in my hardware folder - I've since cleaned it up and tone() works as it should. (I tested it with toneMelody too, and it worked once I reinstalled everything and uploaded again)

Maybe double check that you're using the latest Leostick profile, and there aren't any older files hanging around from a previous version.
Drake is correct, if you have an old board profile in your hardware folder (or a quite old Arduino IDE version, earlier than 1.0.1 I think) then tone() won't work.

To make certain I just tested the toneMelody sketch on pin 11 with the latest board profile v3.3 and Arduino IDE v1.0.3, no problems. Arduino 1.0.4 and 1.0.5 should definitely be fine as well.

- Angus

farrioth
Posts:2
Joined:Sun Aug 04, 2013 1:46 am

Re: tone() not working on Leostick V2

Post by farrioth » Fri Aug 09, 2013 9:50 am

Thanks for your replies, I've got tone() working now after a clean install of version 1.0.3 of the IDE and version 3.3 of the board profile (which was the only version I'd had installed, though). This took a few tries as it turns out that 1.0.3 has a bug where it claims the upload was successful even if it wasn't (1.0.1 would say the upload failed), and so I assumed that 1.0.3 was able to upload without me needing to reset each time, and the Leostick was hanging as before, but it was in fact still hanging on the old code it had on it.

Post Reply