Difference between revisions of "Arduino"
m |
|||
Line 6: | Line 6: | ||
* [http://www.lulu.com/content/1108699 Arduino notebook v6] |
* [http://www.lulu.com/content/1108699 Arduino notebook v6] |
||
==Arduino and Linux== |
==Arduino and Linux== |
||
+ | ===Installation=== |
||
Main instructions are [http://www.arduino.cc/playground/Learning/Linux here] |
Main instructions are [http://www.arduino.cc/playground/Learning/Linux here] |
||
Line 29: | Line 30: | ||
aptitude install librxtx-java |
aptitude install librxtx-java |
||
rm arduino-0017/lib/librxtxSerial.so |
rm arduino-0017/lib/librxtxSerial.so |
||
+ | Initially I also did this but it was a mistake! See below, avrdude bug |
||
aptitude install avrdude avrdude-doc |
aptitude install avrdude avrdude-doc |
||
cd arduino-0017/hardware/tools |
cd arduino-0017/hardware/tools |
||
Line 35: | Line 37: | ||
ln -s /usr/bin/avrdude |
ln -s /usr/bin/avrdude |
||
ln -s /etc/avrdude.conf |
ln -s /etc/avrdude.conf |
||
+ | What you should do is either recompile avrdude ''from the Arduino sources'' for the 64bit platform or, if you have the ia32-libs package, you've nothing to do as the binary provided in arduino-0017 will work out-of-the-box |
||
+ | |||
Now let's try to launch the script arduino-0017/arduino |
Now let's try to launch the script arduino-0017/arduino |
||
− | Tools/SerialPort//dev/ttyUSB0 |
+ | Tools/SerialPort/"/dev/ttyUSB0" |
− | Tools/Board/Arduino Diecimila, Duemilanove or Nanoe, w/ Atmega168 |
+ | Tools/Board/"Arduino Diecimila, Duemilanove or Nanoe, w/ Atmega168" |
+ | ===avrdude bug=== |
||
Now trying the very first code: |
Now trying the very first code: |
||
<br>See [http://www.ladyada.net/learn/arduino/lesson1.html this tuto] |
<br>See [http://www.ladyada.net/learn/arduino/lesson1.html this tuto] |
||
Line 48: | Line 53: | ||
avrdude: Yikes! Invalid device signature. |
avrdude: Yikes! Invalid device signature. |
||
avrdude: Expected signature for ATMEGA168 is 1E 94 06 |
avrdude: Expected signature for ATMEGA168 is 1E 94 06 |
||
− | But the code was apparently correctly uploaded to the board as I got my blinking LED |
+ | But the code was apparently correctly uploaded to the board as I got my blinking LED... |
+ | |||
+ | '''UPDATE''' bug solved! |
||
+ | <br>Actually apparently the version of avrdude which is part of the arduino-0017 release is a patched version as it says: |
||
+ | Version 5.4-arduino |
||
+ | While the version in Debian Squeeze is: |
||
+ | Version 5.8 |
||
+ | So apparently we need absolutely to use the special arduino version. |
||
+ | <br>I was about to compile it from sources as I'm running a 64bit but because I've also the 32bit common libraries, the binary avrdude provided in arduino-0017 is working out-of-the-box!! |
Revision as of 22:51, 20 September 2009
So after the Arduino workshop at BruCON 2009 (pics here, I was seduced by this little development board.
Links
- Freeduino V1.16 Board, based on Atmel Atmega168, 100% compatible with the Arduino Decimilia board
- Arduino official website
- Arduino notebook v6
Arduino and Linux
Installation
Main instructions are here
As I'm using a Debian AMD 64bit, here is what I did:
Installing java from Sun and making sure it will be called by the tools. It might be that other java suites are working but at least java-gcj is missing a GtkLookAndFeel component that Arduino GUI is using
So if you don't have it yet:
aptitude install sun-java6-jre
Then if it's not the one by default, change it: (maybe "java" is enough but let's be consistent)
update-alternatives --config java update-alternatives --config jar update-alternatives --config keytool update-alternatives --config orbd update-alternatives --config rmid update-alternatives --config rmiregistry update-alternatives --config serialver
Other dependencies:
aptitude install avr-libc gcc-avr
Arduino tools, here v0017:
wget http://arduino.googlecode.com/files/arduino-0017.tgz tar xzf arduino-0017.tgz
Arduino tools are coming only for 32bit but it contains only a few executables so let's install the 64bit version of those executables
aptitude install librxtx-java rm arduino-0017/lib/librxtxSerial.so
Initially I also did this but it was a mistake! See below, avrdude bug
aptitude install avrdude avrdude-doc cd arduino-0017/hardware/tools mv avrdude avrdude.disabled mv avrdude.conf avrdude.conf.disabled ln -s /usr/bin/avrdude ln -s /etc/avrdude.conf
What you should do is either recompile avrdude from the Arduino sources for the 64bit platform or, if you have the ia32-libs package, you've nothing to do as the binary provided in arduino-0017 will work out-of-the-box
Now let's try to launch the script arduino-0017/arduino
Tools/SerialPort/"/dev/ttyUSB0" Tools/Board/"Arduino Diecimila, Duemilanove or Nanoe, w/ Atmega168"
avrdude bug
Now trying the very first code:
See this tuto
Well when I tried to upload the bin to the board (menu -> Upload to I/O board), I got the following message:
Binary sketch size: 896 bytes (of a 14336 byte maximum) avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.
Then I tried to inject the -F option to avrdude, it flashed the chip, gave me still errors:
Wrong microcontroller found. Did you select the right board in the Tools > Board menu? avrdude: Yikes! Invalid device signature. avrdude: Expected signature for ATMEGA168 is 1E 94 06
But the code was apparently correctly uploaded to the board as I got my blinking LED...
UPDATE bug solved!
Actually apparently the version of avrdude which is part of the arduino-0017 release is a patched version as it says:
Version 5.4-arduino
While the version in Debian Squeeze is:
Version 5.8
So apparently we need absolutely to use the special arduino version.
I was about to compile it from sources as I'm running a 64bit but because I've also the 32bit common libraries, the binary avrdude provided in arduino-0017 is working out-of-the-box!!