Monday, February 15, 2010

Lockerroom Masterbatioin

LM35 + LCD + Web + MySQL - 7) time display reale;problemi noti


P er la creazione del grafico si è usata la libreria JpGraph ( http://www.aditus.nu/jpgraph/ ) che consente di produrre grafici in PHP in modo molto semplice e flessibile.
Su Ubuntu la libreria si installa comodamente da riga di comando: $ sudo apt-get install libphp-jpgraph all the library files are then installed in the directory / usr / share / jpgraph / PLOTTER.PHP

\u0026lt;? Php
/***** ************************************************** ******************************************
*
* Motivation: builds a graph showing temperatures measured in the last 24hh * * Author: Francesco Parisi (fparisi at tiscali dot it), (fparisi at gmail dot com)


* * Requires: db.php, jpgraph.php , jpgraph_line.php *
*********************************** ************************************************** ************/ require_once

( '/usr/share/jpgraph/jpgraph.php' ); require_once
( '/usr/share/jpgraph/jpgraph_line.php' );
require_once ( 'db.php' );
// Apre la connessione al server $conn =
mysql_connect (
$host , $user , $pass )
or

day ( 'Could not connect to server:' .
mysql_error ());
/ / Select the database $ sel = mysql_select_db ($ dbname ,
$ conn) or

day ( 'Unable to select database:'
. mysql_error ()); / / Temperature latest 24hh
$ sql_last_24hh = 'SELECT * FROM `log` WHERE `time`> = NOW () - INTERVAL 1 DAY' ;
$ res = mysql_query

$ sql_last_24hh )



or



day
(

'Could not execute query:'
.
    
mysql_error ()); / / Format the timestamp and build the axes for the graph
if ($ row
=
mysql_fetch_assoc ($ res
)
or day
(
mysql_error ())
) {
do

{/ / Convert the timestamp to MySQL timestamp PHP $ timestamp


= strtotime ($ row

[ 'time'
]); / / Construct the vector of times (x axis) $ x [] =
sprintf ( "% s,% s" , dates (
'j / n' , $ timestamp) , dates (
'H: i' , $ timestamp ) ) / / Construct the vector of temperatures (y axis)
$ y [] =


$ row [
'temp_int' ];}
while ($ row =
mysql_fetch_assoc ($ res ) );}

/ / Create the graph $ graph =
new Graph
(
1024 , 800
, "auto" ); $graph ->

SetScale ( "textlin" ); $graph

-> img -> SetMargin (
60 , 40 , 40 ,
110 );
$graph
-> title -> Set
(
'Temperature rilevate nelle ultime 24hh' ); $graph -> title -> SetFont ( FF_FONT2 , FS_BOLD ); $graph -> xaxis -> SetTickLabels
(
$x );

$graph -> xgrid ->

Show


(
true
);


$graph
SetLabelAngle

(
90

);


$graph

->
();


// Crea il plot
  

$lineplot

=

new



LinePlot
 (     $y    
); $lineplot
-> value ->
Show ();
$lineplot ->
SetColor (
"blue" );
$lineplot ->
SetWeight (
2 );

// Two pixel wide $lineplot -> value ->
SetColor ( "darkred" ); $lineplot
-> value -> SetFormat (
"% 0.1F"

) / / $ lineplot-> mark -> settype (MARK_FILLEDCIRCLE)
/ / Add the plot to the graph $ graph -> Add ( $ lineplot )
/ / Show the graph $ graph -> Stroke (); / / Close connection



mysql_close ($ conn ) or day ( 'Could not close connection:'
. mysql_error ()); ?> Here's an example of generated chart (click on it to enlarge), which is then drawn into the web page:

Sample Church Answering Machine Greetings

LM35+LCD+web+MySQL - 6) Plotter

logger is the script instructed to read the temperature (by fetcher) and insert it into the MySQL server. This script is run automatically by cron every half hour.
So first you create the database with the SQL table, then the script and then you configure cron.
sql code to create the database and the table will contain time and temperature will be: LOG.SQL
CREATE DATABASE `temperature` ;
CREATE TABLE `temperature` . `log` ( `id` INT

NOT NULL
AUTO_INCREMENT PRIMARY KEY , `time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `temp_int` FLOAT
NOT
NULL
)
ENGINE = MYISAM ;
Lo script logger.php va salvato in una directory diversa da quella html pubblica proprio perché non deve essere richiamabile via web. Personalmente li ho salvati nella cartella utente /home/frank ma si potrebbe pensare anche alla directory /usr/local/bin: LOGGER.PHP <?

/*************************************************************************************************
* * Motivation: store in a MySQL database the temperature acquired by Arduino. * * Author: Francesco Parisi (fparisi at tiscali dot it), (fparisi at gmail dot com) * * Requires: db.php, fetcher . php * ************************************* ************************************************** **********/ require_once (

'fetcher.php' )
require_once ( 'db.php' ) / / Open connect to the server

$ conn = mysql_connect ($ host , $ user , $ pass )
or

day (
'Unable to connect to server: ' . mysql_error ()); / / Select the database $ sel = mysql_select_db (
$ dbname, $ conn ) or day
( 'Unable to select database:' . mysql_error ()); / / Reads from the Arduino temperature $ Temperature = fetchTemp
(); / / insert query $ sql = ( "INSERT INTO` log `(` id `,` time `` `temp_int) VALUES (NULL, NULL,"
. $ temperatures. ")" ) / / Execute the query $
res = mysql_query ($ sql )
ago day ( 'Could not execute query:' .
mysql_error ()); / / Close connection mysql_close (
$ conn) or
day
( 'Could not close connection:'
. mysql_error ()); ? >
logger.php file is included in a db.php file, which contains the access data to the MySQL server. Replace with your own parameters: db.php \u0026lt;?
php $ host = 'localhost' ; $ dbname = 'temperature'
; $ user = 'root' ; $ pass = 'tua_password_qui'
; ?> Finally, will configure cron to run the command:
php / home / frank / logger.php> / dev / null 2> & 1 every half hour. From a shell, run $ crontab-e appears cron editor for the current user. Add the following line:
* / 30 * * * * php / home / frank / # logger.php temperature logs
Save the file and exit the text
sure that the task has been correctly entered:
$ crontab-l There now remains that the creation of graphic and web page that shows the current temperature and the chart itself

Inexpensive Professional Camcorder

LM35+LCD+web+MySQL - 5) Logger,mysql e cron

The first script is the fetcher, in charge of opening the serial port , agreed to send a character ('s' in our case) read the temperature and sends the Arduino and print. ------------------------------------------------ -------------------------------------------------- --------- First of all, we must add the user under which runs the HTTP daemon default (Apache), the group dialout, otherwise the website will not have access to Arduino. Indeed solo gli utenti di questo gruppo hanno il diritto di accedere alle periferiche.
Nel caso di Ubuntu l'utente di Apache è www-data , quindi da shell si lancierà:
$ sudo usermod -a -G dialout www-data
Una volta modificato, riavviare Apache: $ sudo /etc/init.d/apache2 restart Le modifiche così apportate saranno applicate definitivamente. ----------------------------------------------------------------------------------------------------------- Agli inizi avevo provato con phpSerial (una libreria in PHP per la gestione della seriale), ma ho avuto molti malfunzionamenti spesso subdoli che mi hanno portato a sostituirla in favore di Device::Serial Port (
http://search.cpan.org/dist/Device-SerialPort/
) una libreria Perl per la gestione della seriale davvero efficiente e facile da impiegare. La cosa senz'altro più interessante di questa libreria è che consente di disabilitare la linea DTR e quindi di prevenire l'autoreset di Arduino 10000 ogni qualvolta si invia un dato sulla seriale. Per installare Device::Serial Port da Ubuntu/Debian:
$ sudo apt-get install libdevice-serialport-perl Essendo gli altri script in PHP si è usata una funzione wrapper PHP ( fetchTemp() ) che fa semplicemente il lavoro di richiamare da sistema lo script fetcher.pl e riporlo in a variable available to other PHP scripts. Here are two scripts:
FETCHER.PL # / usr / bin / perl-w ########### ################################################## ############################################ #

# Reason: simply download and print to video the temperature acquired by Arduino.










# # Requires: Device:: SerialPort \u0026lt; ; http://search.cpan.org/ ~ cook/Device-SerialPort-1.04/SerialPort.pm>
        # # On Ubuntu: $ sudo apt-get install perl-SerialPort-libdevice      #  

####################################### ################################################## ################ use strict ; use
Device :: SerialPort ; my $portName = "/dev/ttyUSB0" ; # identificativo seriale/USB usata my
$bps = "9600" ; # velocità in bps my
$car = 's' ; # character agreed to the request data
# Constructor (opens the door and commit the resources hw)

my $ port =



Device: SerialPort ->

new
  ($ portName   
)
-> databits
( 8
)
die "failed setting parity"
;
$ port -> stopbits
(
1) di Arduino)

sleep ( 1 );
# attendi 1s # Invia carattere convenuto per la richiesta della temperatura
$port
-> lookclear ;
# svuota buffer $port -> write ( $car ); # invia carattere convenuto
# Legge dato da seriale (in pooling) my $ gotit = "" ;

# data read
until ( " it $ gotit ) { $ gotit
$ port = -> lookfor ; # poll until data ready die "Aborted without match \\ n "Unless
(
defined
$ gotit );}
Destroyer # (closes the door and releases the resources hw)

$ port -> close
wrapper script in PHP, FETCHER.PHP : \u0026lt;?

/******************************************** ************************************************** ***
* * Reason: function "wrapper" for the Perl script to fetch the temperature from Arduino *
* Author: Francesco Parisi (fparisi at tiscali dot it), (fparisi at gmail dot com) * * ************* ************************************************** **********************************/


function
fetchTemp () { $ perlCmd
= '/ usr / bin / perl' ; / / Perl full control of its path $ path = '/ home / frank / public_html /' ; / / path to the Perl script (complete with '/' end)


$ script =
'fetcher.pl'

;

/ / Perl script name


$ temperature =
    exec 
( $ perlCmd . ''
. $ path.
$ script); return
$ temperature;} ?>


highlighted code generated by Generator:
GNU source- highlight 3.1 by Lorenzo Bettini


http://www.lorenzobettini.it

http://www.gnu.org/software/src-highlite

 

Sunday, February 14, 2010

Number Dunkirk Movieplex 59

LM35+LCD+web+MySQL - 4) Fetcher

L
or block diagram is depicted in below (click on it to enlarge):




 



  
The 10k trimmer adjusts the backlight. The two pins are present if the BACKLIGHT LCD has a backlight. The RW pin is "forced" to ground (write only) so you save a connection.

The assembly diagram with the LCD which has been used (drawing made Fritzing) is shown below (click to enlarge):






 









The pin-out of the LCD used:

 




  


1
...
GND

2 ...
+5V


3
...
Contrasto
  (va collegato sul cursore del trimmer) 

4
...
RS
(collegato al pin digitale 12 di Arduino)

5 ...
RW
(collegato a GND)

11,12,13,14 ...
D4,D5,D6,D7
  (rispettivamente collegati ai pin digitali   5,4,3,2      di Arduino)    6   ...  
ENABLE
(collegato al pin digitale 11 di Arduino) 15, 16 ... RETROILLUMINAZIONE (risp. a +5V e GND)
Per i pin fare comunque sempre riferimento al datasheet del LCD usato

Boiling Potatoes For Baked Potato Soup

LM35+LCD+web+MySQL - 3) Schema


tempLM35.zip (tutti i file)
D al momento che l'LM35 nel contesto in cui lavora al più potrà generare circa 0,5V (10mV/°C => 50°C) si è usata come tensione di riferimento quella interna (1.1V) del micro ATmega,per avere una risoluzione migliore.
Infatti con Vref=1,1V ed essendo l'ADC da 10bit abbiamo così 1 LSB = 1,074mV il che assicura una risoluzione di circa 0,1 °C migliore di quella propria del sensore.
In the program loop, it was decided to use three distinct functions for the three respective tasks: the
first, to measure the temperature: readTemp () running
20 readings of the voltage supplied by the sensor, calculates for each temperature and in the end it is the arithmetic mean, this is to have a better estimate of the extent, this value will be the return value of the function, which is stored in the variable temp.
the second, sending the temperature to the serial port: sendTempToSerial ()
takes as input parameter the temperature acquired by readTemp () and sends the serial (USB) only comes when a conventional character (ch) PC


the third, to send the temperature LCD sendTempToLCD () as the previous , takes the temperature acquired by readTemp () and sends the LCD connected locally to Arduino. The refresh takes place with a time of about 0.5s, which has proved a good compromise
So, if you are not interested to see the temperature on the LCD or vice versa will not use the PC side, the loop will be able to "comment on" the function that does not care. NB The sketch works by Arduino release 18 From this release, in fact, changes were made to the implementation of the methods print () / println () Print the class, which now allow to specify (in the second input parameter) the number of digits after the decimal point for course the floating point numbers. If you work on previous releases (and you do not want to upgrade to 18) you can always copy the new interface and implementation file:
Print.cpp
and Print.h release of about 18 previous http://arduino.googlecode.com/svn/trunk/hardware/arduino/cores/arduino/Print.cpp http://arduino.googlecode.com/svn/trunk/hardware/arduino / cores / arduino / Print.h Personally, I have followed this path on my release 17 (17 is the path to the. / Hardware / cores / arduino) and everything worked perfectly. Here's the sketch:
/ * * Sketch: LM35.PDE * Motivation: Measurement of room temperature (indoor) using LM35 sensor
* Author: Francesco Parisi (fparisi at tiscali dot it), (fparisi at gmail dot com) * Last rev.: 1.5 * Date: 09-Feb-2010

* Note: The scale LM 35 is T = K * V, where:
* K = 100 [° C / V] coeff.angolare scale

* V the voltage generated dall'LM35 (10mV / ° C) * T is the temperature in ° C * / / * Include the library for the management of the LCD * /
# include \u0026lt;LiquidCrystal.h>
/ * Match pin LCD \u0026lt;-> Arduino digital pin * /

# define

RS 12 # define EN 11 # define D7 2 # define D6 3
# define D5 4 # define D4 5 / * Number of analog pin is connected to the 'LM35 * / # define ANALOGPIN
5 / * Global Definitions * / double vref = 1.1 ; / / Vref of the ADC (that extension is 1.1 V) LiquidCrystal
lcd ( RS, EN , D4, D5 , D6, D7 ) / / 'lcd' is a variable of type LiquidCrystal * /
/ * * Setting up the hardware / void setup () { / * * Common Settings / analogReference (
INTERNAL ) / / to the ADC we use the internal Vref of 1.1 V (better precision) analogRead ( ANALOGPIN )

/ / First read "empty" (see page. datashett ATmega168 47)

/ * Set up to 'LCD (2x16) * / lcd . begin
(2 , 16); / * Setting for sending data to the serial port * / Serial .

begin
(

9600) ; / / open a serial stream of 9600 bps } / * Reads the temperature * /

double readTemp () {
double temp = 0.0 ; // valore convertito in temperatura (°C) int val
= 0 ; // valore quantizzato dall'ADC [0..1023] int nread = 20 ; // numero di letture

double
somma
= 0.0 ;

// somma delle letture for ( int i = 0 ;

i \u0026lt;nread ; i + +) {

val = analogRead ( ANALOGPIN )


/ / read the data of the voltage on pin 'voltagePin'

temp =
(100.0


* * vref
   val)  
/
1024.0 ;
/ / converts in ° C
sum + = temp ;
/ / add to the temperature read sommaf
delay (
50);
/ / wait 50ms}
return

( sum / nread); / / returns the average temperature
}
/ * Leave the temperature when it comes to the serial nature defendant * / void
sendTempToSerial ( double temp ) {char
incomingByte = 0 ; / / First byte of input from the serial stream
char ch
= 's' ; / / character agreed if ( Serial . available ()
> 0 ) {
incomingByte = Serial
.
read

();

// Leggi il primo carattere in arrivo dal PC via seriale/USB

if (
incomingByte )
// se è quello convenuto...
println


(
temp
);


// ...manda la temperatura al PC via seriale/USB

}




/ * Leave the temperature on an LCD (4bit mode) * / void

sendTempToLCD


(
double temp) {


lcd .
clear ();
/ / Clear the screen
lcd . noblink
();
/ / No blinking cursor lcd .
SetCursor (
0, 0

)

/ / Position cursor to column 1, line 1 . print
(temp

,

1);
/ / print temperature to one decimal place


lcd
    .
  1. print
    ( ''

    )
  2. lcd . print


    (

    (char
  3. )

    223)
/ / prints '°' LCD


.

print (
'C'
);}





/ * Execute repeatedly ... * / Void

      
loop () {

/ / get the temperature and store them in var. temp.
double temp = readTemp
();
/ / send it to the PC via serial / USB when prompted
sendTempToSerial
( temp);
/ / send it to the LCD
sendTempToLCD
(

temp);}



highlighted code generated by Generator: GNU source-highlight 3.1 by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite

Saturday, February 13, 2010

What Does A Wolf Belt Look Like?

LM35+LCD+web+MySQL - 2) Lo sketch

Q
uello I am going to describe is a simple to design for measuring an internal temperature, which sees Arduino obviously used, the known sensor LM35, a classic HD44780 compatible LCD and a PC with Linux OS (eg Debian or a derivative distribution like Ubuntu). The LM35 LCD and Arduino that are connected to aa turn is connected to a PC which runs on an Apache web server, a MySQL server as well as hosting various Perl and PHP interpreters
the side Arduino:
the sensor is connected to one of the six analog inputs, while the LCD is connected to pin 7 (4 + 2 for the data for the control) of the port I / O digital Arduino. The sketch in his loop executes three very simple tasks assigned to three respective functions: dell'LM35 reads the voltage and converts it to degrees Celsius;
if the PC comes from a conventional character (eg the letter 's'), responds by sending the temperature to the PC experience (eg '15 .42' ) LCD still sends about half a second every local temperature acquired
From the PC side: the character of temperature sending request is sent from the PC to Arduino in two usage scenarios:
from the web page, on demand
, whenever the visitor opens the page itself or makes the refresh, the temperature returned by Arduino is so displayed in the web page from a script executed automatically by the system every half hour, the temperature data taken from Arduino is inserted into a MySQL database

The data stored in the database are then processed to create a graph of temperature acquired in the last 24hh. Then the server side, at a general level, we need: A first script,

fetcher, which has the fundamental task of opening the serial (USB), Arduino to send a character (eg ' s') and read from this, the temperature at that time. This script is then used to produce printing on the web page of the current temperature.
A second script,
logger, who also uses it for fetcher
take the temperature, but not see: the place to be in a MySQL database. This script is run automatically by the system every half hour, then stored in the database will read the temperature every half hour (eg 10:00, 10:30 ... etc.). A third and final script plotter, which has the task of taking from the MySQL server temperatures logged by loggers in the last 24hh and create, dynamically, an image with a graph of temperature as a function of time. This image is then displayed on a web page.
A dynamic web page (eg in PHP), call temp that every time you open it to read the temperature at that time by fetcher and printing on the screen. In addition, it must also display the graphic generated by plotter. In the remainder going into details, Arduino first side and then the PC side.

Friday, February 12, 2010

Wedding Quotes In Samoan

LM35+LCD+web+MySQL - 1) Panoramica

blink.pde The classic "hello world" embedded systems is a blinking LED. Arduino has an LED surface-mount technology already

on-board and connected to digital pin 13 ... we'll use that. While you
we're here, we test the flow between serial Arduino and PC to verify the correct installation / configuration librxtxjava.
The idea of \u200b\u200bour "hello world" then it is very simple: to flash the LED, but set the time on / off from the PC via serial / USB: sending the letter 'u' increases the time of 100ms by sending the letter 'd', decreases more than 100ms
From the menu Tools -> Board will select the type of employee Arduino (eg Arduino ... Ten thousand) From the menu Tools> Serial port is select the serial / USB port in use (eg / dev/ttyUSB0)
Done This will create a new sketch and the editor ( File -> New ) will copy & paste the source shown below.
Once saved (eg BLINK.PDE) then you will click on the three icons:
VERIFY : the compile and link: generates several files (including the object size HEX) and put in a dir. temporary (eg / tmp / build on Linux *) UPLOAD: the object file is loaded from HEX programming software (avrdude) in the flash memory of Arduino. At the same time creates a sottodirectory ./applet in cui vengono copiati tutti i file precedentemente messi nella dir. temporanea
MONITOR: è un terminale di scrittura/lettura per dialogare con la seriale Terminato l'upload, il piccolo LED sulla scheda inizierà a lampeggiare inizialmente a un tempo di circa 100ms. Digitando la lettera 'u' e premendo il bottone Send del monitor seriale il periodo verrà incrementato di 100ms e così fino a 1s (1000 ms);successivi invii della lettera 'u' non sortiranno alcun effetto e quindi si potrà solo scendere di tempo (lettera 'd') fino a 100ms.

Ecco lo sketch: by Lorenzo Bettini
http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -> / * * BLINK.PDE

* * Author: Francesco Parisi (fparisi at tiscali dot it)
* * Motivation: "Blink" LED Arduino with a time adjustable from 100ms to 1s PC * * Use: The user from the PC through a terminal emulator, sending


* il carattere 'u' aumenta di 1s il tempo di lampeggio, mentre lo

* diminuisce inviando il carattere 'd'

* * Limitazioni: L'utente non può andare oltre il secondo o al di sotto di 100ms

* */ #define
LEDPIN 13 // Sul pin 13 è collegato il LED montato su Arduino / *** global *** Definitions /
incomingByte int = 0 ;
/ / First byte of input from the serial stream long t = 100 ;
/ / flashing time in ms, 100 ms initially
/ Hardware Setup *** *** void setup () {

pinMode ( LEDPIN , OUTPUT); / / Set the pin 'LEDPIN' as output Serial .
begin ( 9600) ; / / Set up a serial stream of 9600 bps }
/ *** *** Runs continuously / void
loop () { digitalWrite ( LEDPIN ,
HIGH);

/ / Send high level on pin 'LEDPIN' (LED on) delay ( t); / / Wait 't' ms




digitalWrite ( LEDPIN ,
LOW);
/ / Send low on pin 'LEDPIN' (LED off) delay ( t);
/ / Wait 't' ms
if ( Serial .
available () > 0 )
// Se ci sono caratteri in arrivo dal PC...
{ incomingByte = Serial . read (); // ...leggi il primo carattere
if
( incomingByte == 'u' ) // se è 'u' (sta per UP)... t +=
100 ; // ...incrementa di 100ms else
if ( incomingByte == 'd' ) // altrimenti se è 'd' (sta per DOWN)...
t
-= 100

;
// ...decrementa di 100ms

if

( t > 1000 ) // se si prova a salire oltre 1s...
t =
1000
; // ...imposta t a 1s else
if ( t < 100 ) // se si prova a scendere sotto i 100ms...
t = 100 ; // ...imposta t a 100ms } Serial .
print (t , DEC); / / Write the time in ms Serial . println
( "ms" ) / / Write "ms" (units) and wraps
}

Sunday, February 7, 2010

Sclerosis Of The Spine

Uno sketch per il test dell'installazione

A After installing the library that allows the recognition of Arduino, you can begin installing the development environment (IDE) that will write the programs (sketch) and upload (via USB) on board. The Arduino IDE is written in Java, so there is only one packet platform that is interpreted by the Java run-time operating system. To work needs to be there on the system the following packages: java- librxtx the Sun JRE, the compiler gcc and libc for AVR. The command to install all these packages is as follows:
$ sudo apt-get install sun-java6-jre avr-libc gcc-avr Note: The repository (January 2010) to ensure that Ubuntu the version of avr-gcc is definitely greater than 4.3.0, which instead gives some problems and does not support the the new micro Arduino 2009 (see http://www.arduino.cc/playground/Learning/Linux ). version installed (January 2010) is 4.3.3 (ie> 4.3.0)
Regarding the installation of
librxtx, however, there are two different paths depending on the version of Ubuntu .

If you're on Ubuntu 32-bit version that is good
Repository:
$ sudo apt-get install java-librxtx
However, if you're on Ubuntu 64-bit version
, we must download and install this latest version of librxtx: http://chemicaloliver.net/code/librxtx-java_2.2pre2_amd64.deb
(which is newer than the current repository, which instead gives problems). The . Deb package can be installed at the time of discharge with the graphical front end
Gedi
or with dpkg from the command line. Assuming that the package has been saved in your home directory: $ cd
~ $ sudo dpkg-i-librxtx java_2.2pre2_amd64.deb It then goes to download the package the IDE. From the site http://code.google.com/p/arduino/downloads/list

download the latest version of the package platform (choose the format. tgz) and save it in your home directory (eg / home / frank ) The file name follows the syntax
arduino-xxxx.tgz where xxxx is the progressive version. At the time of writing, the current version is 0017, then the newer file is arduino-0017.tgz

goes without saying that for the future, replace the number reported in the controls after 0017 with the number of the latest version. Move to the home directory and unpack the archive: $ cd
~ $ tar-zxvf arduino 0017.tgz the home dir. It will then create the folder arduino-0017

Also from your home directory to the folder lib of the installation, eg.
~ $ cd arduino-0017/lib


and rename the file
librxtxSerial.so : ~ $ mv

librxtxSerial.so librxtxSerial.so.orig
this will allow you to use the correct library librxtx
(previously installed) for the version of Ubuntu used (if 32 or 64 bit) At this point the installation is substantially complete except for some step "cosmetic" definitely Recommended. The first is to create a directory on the home directory, eg. named
pde): $ mkdir ~
Arduino


You are ready for first start the IDE; Change directory
arduino-0017 and launch the executable arduino:
~ $ cd arduino-0017

$. / arduino


Optionally you can create a symbolic link that points

arduino, from time to time, the updated version arduino-xxxx
  1. ~ $ ln -s arduino-0017 ./arduino

  2. Al primo avvio, ci verrà chiesta la directory di lavoro, dove salveremo i nostri sketch. Questa cartella rappresenterà il nostro "
  3. Sketchbook
  4. " e potrà essere comodamente richiamato dal menù file dell'IDE (File -> Sketchbook) . Selezionamo dunque come directory di lavoro quella precedentemete creata (~/Arduino):




L'ultimo passo è quello di creare un lanciatore sulla Scrivania, seguendo l'ottimo suggerimento che ho trovato su Ubuntu Forum:
  1. http://ubuntuforums.org/showpost.php?p=5974212&postcount=1
  2. L'icona che will be used for the pitcher
  3. http://osx.iusethis.com/icon/osx/arduino.png
will be saved in your home dir and then from there, copied it to / usr / share / icons:


~ $ sudo cp arduino.png / usr / share / icons
  1. Personally I preferred the new icon of Arduino 17: http://upload.wikimedia.org/wikipedia/commons/d/d7/Arduino-0017-512x512px.png

  2. Navigate to the same desk with the right mouse button pop-up menu select "Create launcher ..."
  3. form appears with the properties of the pitcher, whose fields are filled as shown:

  4. Nel campo Comando digitare:
  5. bash -c "cd /home/nomeutente/arduino-0017/; ./arduino " Nel campo Nome: digitare

    arduino
  6. A questo punto, cliccare sull'icona di default del lanciatore ("la molla") e selezionare l'icona arduino.png precedentemente salvata in /usr/share/icons.
Ecco come compare l'icona di Arduino sulla mia scrivania:




Deep Things To Write In A Wedding Card

Installare l'IDE di Arduino su Ubuntu 9.10

Arduino 'Diecimila' e le versioni successive USB, come la '2009', usano l'arcinoto circuito integrato FT232 per realizzare Bridge USB / UART. words, so Ubuntu "sees" Arduino, you need to install on our system, a management library for this chip.
The library is installed from the command line (with the utility system
apt-get) so much easier and more convenient than with Windows ...
Let's see how to do ..

first update the package database:
$ sudo apt-get update

The package to install libftdi1
(the library for controlling hardware FTDI, compiled and written in C), then, launch :
$ sudo apt-get install libftdi1


If our system is installed the package brltty

(an access software for blind people using braille display ) this should be removed because it conflicts with the FTDI driver. Thus, to caution, however, we run the uninstall command of this package even if the result is negative:

$ sudo apt-get remove brltty brltty-x11
you are ready for testing hardware ... 's make sure that the power is derived from the 5V of USB Arduino: there is a jumper on the card, the USB plug, which must be located on the 'USB' and not 'EXT', otherwise the card is powered by an external power supply connected to its plug.
Open a shell and run:

$ tail-f / var / log / messages Arduino Connecting with the USB cable to your PC ... in the shell you should see messages like:

usb 3 - 1: new full speed USB device using ohci_hcd and address 2
usb 3-1: configuration # 1 Chosen
from 1 choice usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial usbserial_generic
: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device