1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
arduino-core for Debian
-----------------------
N.B. This package has not been widely tested -- your miliage may vary
Bug reports welcome :-)
This package contains the bare minimum required to program an Arduino
using Arduino sketches via the command line.
It DOES NOT contain the Java IDE -- if that's want you want you need to
install the main arduino package as well (which depends on this one)
=-=-=-=-
QuickStart:
[This is based on http://mjo.tc/atelier/2009/02/arduino-cli.html]
create a new directory, and change to it (the name doesn't matter)
mkdir ~/arduino-playpen ; cd ~/arduino-playpen
Create a Makefile:
cat > Makefile <<'!====EOF====!'
ARDUINO_DIR = /usr/share/arduino
#TARGET = CLItest
#ARDUINO_LIBS = LiquidCrystal
MCU = atmega168
F_CPU = 16000000
ARDUINO_PORT = /dev/ttyUSB*
AVRDUDE_ARD_PROGRAMMER = arduino
AVRDUDE_ARD_BAUDRATE = 57600
#AVRDUDE_ARD_EXTRAOPTS = -F
include /usr/share/arduino/Arduino.mk
!====EOF====!
(obviously, set things to match the device you are trying to program)
grab an example:
cp /usr/share/arduino/examples/Digital/Blink/Blink.pde .
compile and upload it:
make TARGET=Blink
make TARGET=Blink upload
or do it all at once, thus:
make TARGET=Blink all upload
If you set the TARGET= string in the makefile, you obviously don't
need to keep specifying it.
If the upload doesn't work, try unplugging/replugging the Arduino.
If avrdude complains about mismatching signatures, and suggests setting -F,
try uncommenting the AVRDUDE_ARD_EXTRAOPTS line
=-=-=-=-
Please tell me if this fails for you, and if possible, what you did to
the Makefile to make it work.
I did consider making a script that would automate the above QuickStart,
but I think you're going to want to do it by hand at some point, so you
might as well do that from the start. I'm open to persuasion that some
sort of script is needed if only to tell people who try to run it to
read this file instead ;-)
-- Philip Hands <phil@hands.com> Wed, 28 Apr 2010 09:46:10 +0100
|