giovedì 6 gennaio 2011

Arduino on Debian PPC

If you want to program Arduino boards in Debian PPC systems you should use arduino-core package, because the arduino package for PPC architecture is broken.
arduino-core is console based, and uses a Makefile to talk to arduino.
Here are the steps you have to follow to use it:

Install arduino-core:
# aptitude install arduino-core
(Remember to do not use aptitude if you usually use apt-get)

Add yourself to uucp and dialout groups:
# gpasswd -a USERNAME uucp
# gpasswd -a USERNAME dialout
dialout is needed to handle /dev/tty* files, uucp seems necessary to work with avrdude.

Now you have to create a Makefile in the same directory whre the .pde file is.
I have an Arduino 2009 with an ATmega329 microcontroller, so my Makefile looks like this:
ARDUINO_DIR = /usr/share/arduino

#TARGET       = CLItest
#ARDUINO_LIBS = LiquidCrystal

MCU          = atmega328p
F_CPU        = 32000000


include /usr/share/arduino/

If you use a different microcontroller you should set MCU and F_CPU variables properly.

Now you are ready to program your arduino! Assuming that you want to upload Blink.pde (and that you and your Makefile is in the same directory of Blink.pde), type:
$ make TARGET=Blink
$ make TARGET=Blink upload

The first line creates the .hex file and the second upload it to the board.

For more informations:
nano /usr/share/doc/arduino-core/README.Debian

Nessun commento:

Posta un commento