~ubuntu-branches/debian/experimental/arduino/experimental

« back to all changes in this revision

Viewing changes to debian/arduino-core.README.Debian

  • Committer: Package Import Robot
  • Author(s): Scott Howard
  • Date: 2012-03-11 18:19:42 UTC
  • mfrom: (1.1.5) (5.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120311181942-be2clnbz1gcehixb
Tags: 1:1.0.1~rc1+dfsg-1
New upstream release, experimental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
arduino-core for Debian
2
 
-----------------------
3
 
 
4
 
N.B.  This package has not been widely tested -- your mileage may vary
5
 
      Bug reports welcome :-)
6
 
 
7
 
This package contains the bare minimum required to program an Arduino
8
 
using Arduino sketches via the command line by using the included Makefile
9
 
in this Debian package, an external Makefile, or other build system (e.g.
10
 
http://code.google.com/p/arscons/)
11
 
 
12
 
It DOES NOT contain the Java IDE -- if that's want you want you need to
13
 
install the main arduino package as well (which depends on this one)
14
 
 
15
 
=-=-=-=-
16
 
 
17
 
QuickStart:
18
 
 
19
 
[This is based on http://mjo.tc/atelier/2009/02/arduino-cli.html]
20
 
 
21
 
  create a new directory, and change to it (the name doesn't matter)
22
 
 
23
 
    mkdir ~/arduino-playpen ; cd ~/arduino-playpen
24
 
 
25
 
  Create a Makefile:
26
 
 
27
 
cat > Makefile <<'!====EOF====!'
28
 
ARDUINO_DIR = /usr/share/arduino
29
 
 
30
 
#TARGET       = CLItest
31
 
#ARDUINO_LIBS = LiquidCrystal
32
 
 
33
 
MCU          = atmega168
34
 
F_CPU        = 16000000
35
 
ARDUINO_PORT = /dev/ttyUSB*
36
 
 
37
 
AVRDUDE_ARD_PROGRAMMER = arduino
38
 
AVRDUDE_ARD_BAUDRATE   = 57600
39
 
#AVRDUDE_ARD_EXTRAOPTS  = -F
40
 
 
41
 
include /usr/share/arduino/Arduino.mk
42
 
!====EOF====!
43
 
 
44
 
  Edit any settings that need to be different if you've got something other than
45
 
  an atmega168, or if your serial port turns out not to be /dev/ttyUSB0.
46
 
  There is more information about the varieties of boards here:
47
 
     /usr/share/arduino/hardware/arduino/boards.txt
48
 
  although it's perhaps best to check the state of the art, here:
49
 
     https://github.com/arduino/Arduino/raw/master/hardware/arduino/boards.txt
50
 
 
51
 
  grab an example:
52
 
 
53
 
    cp /usr/share/arduino/examples/Digital/Blink/Blink.pde .
54
 
 
55
 
  compile and upload it:
56
 
 
57
 
    make TARGET=Blink
58
 
 
59
 
    make TARGET=Blink upload
60
 
 
61
 
  or do it all at once, thus:
62
 
 
63
 
    make TARGET=Blink all upload
64
 
 
65
 
  If you set the TARGET= string in the makefile, you obviously don't
66
 
  need to keep specifying it.
67
 
 
68
 
  If the upload doesn't work, try unplugging/replugging the Arduino.
69
 
 
70
 
  If avrdude complains about mismatching signatures, and suggests setting -F,
71
 
  try uncommenting the AVRDUDE_ARD_EXTRAOPTS line
72
 
 
73
 
  If avrdude tells you "programmer is not responding" it could well be
74
 
  a baud-rate mismatch.  Refer to the boards.txt file(s) mentioned above.
75
 
 
76
 
=-=-=-=-
77
 
Please tell me if this fails for you, and if possible, what you did to
78
 
the Makefile to make it work.
79
 
 
80
 
I did consider making a script that would automate the above QuickStart,
81
 
but I think you're going to want to do it by hand at some point, so you
82
 
might as well do that from the start.  I'm open to persuasion that some
83
 
sort of script is needed, if only to tell anyone that runs it to read
84
 
this file instead ;-)
85
 
 
86
 
 -- Philip Hands <phil@hands.com>  Wed, 28 Apr 2010 09:46:10 +0100