Chronomètre avec enregistrement des tours (1 de 3)

10k ohm résistance
un sensor de pression branché dans analog 2

a chaque écrasement du sensor, il sort le temps écoulé depuis le dernier écrasement du force sensor.

**
com3: arduino : avec alimentation dans une prise de courant
com4: arduino : alimenté par usb.
com5: antennes rf

Mes 2 arduinos vont avoir le code ci dessous, puisque chacun d'eux ont un sensor de pression attaché au analog2.

Maintenant j'ai des problèmes avec la transmission RX tX, et mes antennes apc220. je ne suis pas cappable d'envoyer du premier arduino vers le deuxième, pour voir dans le serial monitor les temps du premier et du deuxième arduino.

Toute aide serait vraiment appréciée
merci!!

/*

Make Magazine - Force Sensor Demo

This simple program visually shows the amount of force placed on the sensor
There are much more efficient ways to program, this way was chosen because
it is very easy to understand.

By Marc de Vinck - Licensed under Creative Commons....whatever.


*/

// Here are the constants that we define prior to the program running

int forcePin = 2; // select the input pin for the force sensor
int val = 0; // variable to store the value coming in from the sensor
int led5=13; // defines "led5" as the number 13
unsigned long tempsPrecedent = 0, tempsActuel = 0,tempsTotal = 0; // mes variables de temps
unsigned long centitot1 = 0; // centieme to display
unsigned long secotot1 =0; // seconds to display
unsigned long minutot1 =0; // minutes to display

unsigned long inputVal =0;

// End of constant definitions

void setup() //run one time when the Arduino first powers up
{Serial.begin(9600); //starts serial communication, only used for debgugging
pinMode(led5, OUTPUT);
} // remeber led5 = pin 13, this statement sets pin 13 to output only

void loop() //This next bit of code runs continuously
{
val = analogRead(forcePin); // read the value from the sensor
//inputVal = Serial.read();
// Serial.println(inputVal, DEC);

//Serial.println(val,DEC); // print the value "val" of the sensor (used for debugging)

if (val>500){ //if the value is maxed out or greater than 250
digitalWrite(led5,HIGH); // turns on all 5 LEDs
//delay(100); //slight delay to minimize flickering

tempsTotal=tempsActuel - tempsPrecedent;
Serial.print("temps precedent: ");
Serial.println(tempsPrecedent);/* On bouge Zozor */
Serial.print("temps actuel: ");
Serial.println(tempsActuel);
Serial.print("temps total: ");
Serial.println(tempsTotal);

centitot1 = (tempsTotal%1000)/10 ; //centieme to display
secotot1 = (tempsTotal/1000)%60 ; // second to display
minutot1 = (tempsTotal/1000)/60 ; // minute to display

Serial.print("Votre temps: ");
Serial.print(minutot1);
Serial.print(":");
Serial.print(secotot1);
Serial.print(":");
Serial.println(centitot1);

tempsPrecedent = tempsActuel;
delay(1000);
}
else{
digitalWrite(led5,LOW); //turn off led 13
tempsActuel = millis();

}

}