5:04 pm
April 2, 2015
Hi all,
I've got a Mega2560 with a Multi-function shield, which contains amoung others a buzzer that is controlled by Pin D3 via a small transistor. I tested your example 'Tone - Play Song.vi' successfully. But due to the inversion by the transistor, the buzzer continues beeping when the code is finished (which is quite disturbing!).
I added 'Tone Stop.vi' and ACCL.lvlib: Digital Write.vi with True after the for loop in order to stop that beep. Saved the code, than compiled & downloaded it. Got an error, which I sent. Afterwards I just compiled the very same code OK and again compiled & downloaded it OK.
Now the code runs as expected.
But why did I got that error, which went away by 'just' compiling? Can I trust the code?
5:25 pm
March 12, 2015
Thanks for sending your error report. The error you received seems to be within the Arduino toolchain.
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/lib/avr6/crtm2560.o:(.init9+0x0): undefined reference to `main'
We have never seen this before but there are several Arduino posts related to something like this. What version of the Arduino IDE are you using? Yes, I would expect you can "trust" the code. This was a simple linking issue.
28
1 Guest(s)