bonjour Robert,
desole de repondre ke maintenant mais g eu kelke soucis enfin bref!
voila mon code arduino duemilanove
/* Supports as many analog inputs and analog PWM outputs as possible.
*
* This example code is in the public domain.
*/
#include <Firmata.h>
byte analogPin;
void analogWriteCallback(byte pin, int value)
{
pinMode(pin,OUTPUT);
analogWrite(pin, value);
}
void setup()
{
Firmata.setFirmwareVersion(0, 1);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.begin(11500);
}
void loop()
{
while(Firmata.available()) {
Firmata.processInput();
}
for(analogPin = 0; analogPin < TOTAL_ANALOG_PINS; analogPin++) {
Firmata.sendAnalog(analogPin, analogRead(analogPin));
}
}
sinon g plus simple
/*
Analog input, serial output
Reads an analog input pin, prints the results to the serial monitor.
The circuit:
* potentiometer connected to analog pin 3.
Center pin of the potentiometer goes to the analog pin.
side pins of the potentiometer go to +5V and ground
created over and over again
by Tom Igoe and everyone who's ever used Arduino
*/
float Value;
void setup() {
Serial.begin(9600);
}
void loop() {
// read the analog input into a variable:
float analogValue = analogRead(3);
// print the result:
Value = analogValue;
Serial.println(Value, DEC);
// wait 10 milliseconds for the analog-to-digital converter
// to settle after the last reading:
delay(10);
}
et je ne connais pas C# ( visual C# 2008 edition express)
mais je dois afficher en permanence la tension relevée sur le pin analogique et g tout essayé mais je n'y arriv pas et le temps press pour moi car mon stage fini dans kelke jour, si tu pouvais m'aider j'apprecierais enormément
merci kiars95