I'm playing with arduino, leds and pushbuttons, and everything works cool, except by two things.
I use a Makefile to compile my sketches, but sometimes a get the following error:
applet/rainbow.cpp:103: undefined reference to `Print::println(char const*)'
applet/rainbow.cpp:106: undefined reference to `Print::println(char const*)'
applet/rainbow.cpp:109: undefined reference to `Print::println(char const*)'
I understand that means I need to include the Print.h, include it give me the same error, but if took the code and open it inside arduino ide compiles without errors, does somebody knows what could be wrong?
This is my sketch: http://signus.ath.cx/rainbow/rainbow.pde
This is my Makefile: http://signus.ath.cx/rainbow/Makefile
The second problem that I have (but I can live with this one) is that after execute 'make upload' to upload the program to arduino, I cannot repeat the operation without removing the usb cable from my laptop and the plugging it again, it gives me the following error:
/usr/bin/avrdude -V -F -C /etc/avrdude.conf -p atmega168 -P /dev/ttyUSB0 -c stk500v1 -b 19200 -U flash:w:applet/pushbutton.hex
avrdude: stk500_getsync(): not in sync: resp=0x06
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x06
avrdude done. Thank you.
make: *** [upload] Error 1
I hope somebody could give a clue about what's wrong
BTW, I'm using debian unstable (sid)