Modifications

Sauter à la navigation Sauter à la recherche
3 814 octets ajoutés ,  16 janvier 2014 à 22:01
Page créée avec « {{RPI-ShieldBridge-NAV}} == Firmata? Kaséko? == Firmata is a protocol for communicating with microcontrollers from software on a host computer. So you can control an Ardui... »
{{RPI-ShieldBridge-NAV}}

== Firmata? Kaséko? ==

Firmata is a protocol for communicating with microcontrollers from software on a host computer. So you can control an Arduino with a Raspberry Pi using Firmata.

There is a tutorial for Firmata and Raspberry Pi in [http://www.themagpi.com/en/issue/7 The MagPi N°7] and here is also a small guide.

== Préparer votre Arduino / RPi-ShieldBridge ==

Le première opération consiste à téléverser le croquis/sketch '''Firmata''' sur l'Arduino compatible du RPi-ShieldBridge.

Vous pouvez réaliser cette opération de deux façons différentes:
# '''Via le port FTDI'''<br />permettant de programmer directement l'Arduino compatible du RPi-ShieldBridge depuis votre ordinateur.
# '''Via votre Raspberry-Pi'''<br />en utilisant l'interface série sur le port GPIO du Pi (voir section [[RPI-ShieldBridge-ArduinoIDE|Installer Arduino IDE sur Raspberry Pi]]).

=== Téléverser Firmata via FTDI ===

* Download and install the [http://arduino.cc/en/Main/Software Arduino IDE] on your computer ou votre Raspberry Pi.
* Close the '''JVCC''' Jumper next to the FTDI connector to power the RPi-ShieldBridge from the FTDI adapter or put it on a Raspberry Pi for powering.
* Connect the RPi-ShieldBridge with a FTDI adapter (5V) to the computer or Raspberry Pi.
* Run the Arduino IDE.
* Select '''Arduino Uno''' under '''Tools->Board'''.
* Select the serial port from the FTDI adapter under Tools->Serial Port.
* Open the Firmata Sketch under '''File->Examples->Firmata->StandardFirmata'''.
* Upload the Sketch. If there are upload problems then add a pull-down resistor (10k-47k Ohm) between '''GPIO18''' or '''Jumper''' JBL and GND.
* Now exit the Arduino IDE.

=== Téléverser Firmata via GPIO du PI ===
Il est également possible d'utiliser la connexion série matérielle du Raspberry Pi pour téléverser le Croquis/Sketch Firmata sur le RPi-ShieldBridge.

Voyez aussi notre section [[RPI-ShieldBridge-ArduinoIDE|Installer Arduino IDE sur Raspberry Pi]] pour les instructions ci-dessous
* Close the Jumpers: '''JTX''', '''JRX''' and '''JBL''' on the RPi-ShieldBridge.
* Install the Arduino IDE on the Raspberry Pi.
* Run the Arduino IDE.

Pour téléverser Firmata
* Select Arduino Uno under Tools->Board.
* Select the hardware serial port /dev/ttyAMA0 under Tools->Serial Port.
* Open the Firmata Sketch under File->Examples->Firmata->StandardFirmata.
* Upload the Sketch.
* Now exit the Arduino IDE.

== Préparé votre Pi ==
Grâce à Firmata, il sera possible de contrôler les entrées/sorties du compatible Arduino (RPi-ShieldBridge) à partie de votre Raspberry-Pi par l'intermédiaire d'une connexion série (entre Pi et RPi-ShieldBridge).

Il faut donc disposer d'une connexion série entre les deux éléments, ensuite, nous pourrons nous attaquer au code en Python (ou Node.js)

Vous pouvez vous connecter sur l'Arduino du RPi-ShieldBridge et communiquer avec ce dernier de deux façons:
* Via USB et un {{pl|77|convertisseur USB/Série}}
* Via UART (port série matériel du Raspberry Pi accessible sur le GPIO)

=== Connexion USB (convertisseur FTDI) ===
* Put the RPi-ShieldBridge on the Raspberry Pi.
* Connect a FTDI adapter (5V) to the USB port of the Raspberry Pi and FTDI connector on the RPi-ShieldBridge.
* Device name: /dev/ttyUSB0 or /dev/ttyACM0

=== Connexion UART (port série matériel) ===
* Close the Jumpers JTX and JRX on the RPi-ShieldBridge.
* Put the RPi-ShieldBridge on the Raspberry Pi.
* Disable Linux serial console.
* Device name: /dev/ttyAMA0

== Contrôle avec Python ==
Maintenant:
# que Firmata est téléversé et actif sur RPi-ShieldBridge,
# que nous disposons d'une connexion série entre Raspberry-Pi et RPi-ShieldBridge

Nous allons pouvoir nous attaquer au reste.

{{traduction}}

{{RPI-ShieldBridge-TRAILER}}
32 920

modifications

Menu de navigation