My first succesfull test :
http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1202054885
Right ! Thanks for all your help. I did here below a little step by step how I managed to get it work.
Preface : Every line starting with 'tux@ubuntu:~$' ,means that this is a command excuted by the command line
Preface : Every reference to $HOME or /home/tux , can be changed to your own home directory.
1. Check if device is recognized by system
-connect usb device to system
Code:
tux@ubuntu~$ dmesg | tail | grep "FTDI USB Serial" | grep -c "now attached"
the result of this must be '1'
If it is 0 , then your device is not recognised. (check if the brtty package is installed)
2. Prepare needed files ,and execute a little test
Code:
tux@ubuntu~$ cd $HOME
-install pre-requisites :
First the downloads out of the box :
Code:
tux@ubuntu~$ sudo apt-get install gcc-avr avr-libc avrdude unzip
Then avrdude ,from arduino itself :
Code:
tux@ubuntu~$ apt-get install gcc yum bison flex
tux@ubuntu~$ wget
http://www.arduino.cc/files/avrdude-5.4 ... 10-src.tgz
tux@ubuntu~$ gunzip -c avrdude-5.4-arduino-0010-src.tgz | tar -xvf -
tux@ubuntu~$ cd ./avrdude-5.4-arduino-src
tux@ubuntu~$ ./configure
tux@ubuntu~$ make clean
tux@ubuntu~$ make
tux@ubuntu~$ sudo make install
-Download and unpack the core file in $HOME/arduino
Code:
tux@ubuntu~$ wget
http://www.arduino.cc/en/uploads/Hackin ... 7-core.zip
tux@ubuntu~$ unzip arduino-0007-core.zip
-Download and configure the Makefile
Code:
tux@ubuntu~$ mkdir $HOME/arduino_projects
tux@ubuntu~$ cd $HOME/arduino_projects
tux@ubuntu~$ wget
http://www.arduino.cc/en/uploads/Hacking/Makefile
tux@ubuntu~$ cp -p $HOME/arduino_projects/Makefile $HOME/arduino_projects/Makefile.original
-Create you testproject file ,connect a led between GND and pin 13 :
Code:
tux@ubuntu~$ vi $HOME/arduino_projects/helloworld.cpp
And enter this :
Quote:
#include <WProgram.h>
/* Blinking LED
* ------------
*
* turns on and off a light emitting diode(LED) connected to a digital
* pin, in intervals of 2 seconds. Ideally we use pin 13 on the Arduino
* board because it has a resistor attached to it, needing only an LED
*
* Created 1 June 2005
* copyleft 2005 DojoDave <
http://www.0j0.org>
*
http://arduino.berlios.de
*
* based on an orginal by H. Barragan for the Wiring i/o board
*/
int ledPin = 13; // LED connected to digital pin 13
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}
edit the Makefile and change these lines :
Code:
tux@ubuntu~$ vi $HOME/arduino_projects/Makefile
#<<== First the port on which to connect to ==>>#
#<<== This port can be found in the message log ==>>#
To know the port :
Code:
tux@ubuntu~$ dmesg | tail | grep "FTDI USB Serial" | sed 's/to/\;/g' | awk -F";" '{ print $2 }' | tail -1 | sed 's/ //g'
Edited:
From : PORT = /dev/tty.usbserial*
To : PORT = /dev/ttyUSB0
#<<== Then change the location to the core files ==>>#
Edited:
From : ARDUINO = /Applications/arduino-0007/lib/targets/arduino
To : ARDUINO = /home/tux/arduino
#<<== Specify project loaction ==>>#
Edited:
From : TARGET = foo
To : TARGET = /home/tux/arduino_projects/helloworld
#<<== Change this line ,depending of the version of you arduino ATMEL chip ==>>#
#<<== Out of the box ,the makefile is made for the ATMEGA8 , so I needed to change it to ATMEGA168 ==>>#
Edited:
From : MCU = atmega8
To : MCU = atmega168
#<<== I also needed to change this line ,which I think is due to version of the board ==>>#
Edited:
From : AVRDUDE_PROGRAMMER = stk500
To : AVRDUDE_PROGRAMMER = stk500v1
FINAL STEP
Now clean out the make ,perform a make ,and upload it.
Code: Select all
tux@ubuntu~$ cd $HOME/arduino_projects
tux@ubuntu~$ make clean
tux@ubuntu~$ make
tux@ubuntu~$ make upload
Now wait a few seconds and the led should start to blink. (If not check if polarity of the connected led is ok)
And voila , pfwoeih ... not straight forward. But hey ; IT never is (luckely for us)