Bonjour;

Je suis chargé pour un projet de faire en sorte qu'une carte Arduino couplé à ZigBee puisse communiquer avec une autre Arduino aussi équipé de ZigBee afin de faire varier l'intensité lumineuse grâce à un capteur. Je dispose de ce programme qui fonctionne sur une installation câblée sans Zig Bee. Ors malgré mes recherches je ne trouve aucun tutoriel ou document français expliquant comment adapter un programme Arduino afin qu'il puisse utiliser Zig Bee . J'aimerais si possible avoir un peu d'aide ou un lien d'un site qui me serait passé à coter

Voici le programme;



// These constants won't change. They're used to give names

// to the pins used:

#include "LiquidCrystal.h"



LiquidCrystal lcd(11,10,9,8,7,6,5,4,3,2); //liaison 8 bits de données



const int analogInPin = A0; // Analog input pin that the potentiometer is attached to

const int analogOutPin = 11; // Analog output pin that the LED is attached to

const int TouchPin=9;

const int ledPin=11;





int mavariable = 42;

int sensorValue = 0; // value read from the pot

int outputValue = 0; // value output to the PWM (analog out)



void setup() {

// initialize serial communications at 9600 bps:

Serial.begin(10200);

lcd.begin(16,4); //utilisation d'un écran 16 colonnes et 4 lignes

lcd.write("123456789123456789" );

pinMode(TouchPin, INPUT);

pinMode(ledPin,OUTPUT);

}



void loop() {



int sensorValue = digitalRead(TouchPin);



if(sensorValue==1)

{

digitalWrite(ledPin,HIGH);

}



else if(sensorValue==0)

{

// read the analog in value:

sensorValue = analogRead(analogInPin);

// map it to the range of the analog out:

outputValue = map(sensorValue, 0, 790, 255, 0);

// change the analog out value:

analogWrite(analogOutPin, outputValue);

}

else

{

digitalWrite(ledPin,LOW);

}



// print the results to the serial monitor:

Serial.print("sensor = " );

Serial.print(sensorValue);

Serial.print("\t output = ");

Serial.println(outputValue);



// wait 2 milliseconds before the next loop

// for the analog-to-digital converter to settle

// after the last reading:

delay(1);



}


Adrien
Merci