tomvdb / avr_arduino_leonardo

simple example programs to use arduino leonardo as avr development board (no arduino libs)
4 stars 1 forks source link

make program #1

Open eberdahl opened 11 years ago

eberdahl commented 11 years ago

You might want to, at the very least, update the Readme file. It took me a few hours to figure out how to actually program it (I programmed the Arduino Micro to have a blinking light using your example).

I did this on OS X 10.8.

First, find out what the name of your device shows up as (e.g. /dev/tty.usbmodem1d11) and then set this accordingly in the Makefile. So, for me, I changed AVRDUDE_PORT = com1 # programmer connected to serial device to AVRDUDE_PORT = /dev/tty.usbmodem1d11 # programmer connected to serial device

Then it may also have been necessary to change the programmer (anyway that's what Arduino IDE was doing -- to find out for your board, just go to preferences and set it to produce verbose output upon upload). I changed the following in Makefile AVRDUDE_PROGRAMMER = stk500v2 to AVRDUDE_PROGRAMMER = avr109

THEN the last trick is that you have to run "make program" about 0.5 seconds after plugging in your Arduino via USB. (Arduino apparently uses some more complicated trick of opening the serial at 1200bps and then closing it again immediately, but I found unplugging and plugging the Arduino in again worked fine to reset it to prepare it for receiving a new program).

Cheers and happy hacking! -Edgar

tomvdb commented 11 years ago

Hey Edgar,

Thanks for you feedback. This project is long overdue for some updates. Thanks for the information. I'll be updating everything soon with a few extra projects.

T