Commit 832090d6 authored by hichbra's avatar hichbra

fix

parent 2a4f9ebc
Pipeline #110 canceled with stages
#define PORT_HALL A0
#define PORT_FSR A2
int hallAnalogique ;
int gauss;
int hallAnalogique ; // La lecture analogique du gaussmetre
int gauss; // Valeur convertie en gauss
// -------------------------------------------------
int fsrAnalogique ; // La lecture analogique depuis le pont diviseur FSR+Resistance.
int fsrVoltage; // La lecture analogique convertie en tension
unsigned long fsrResistance; // La tension convertie en resistance
unsigned long fsrConductance;
long fsrForce; // La resistance convertie en force (Newton)
long newton; // La resistance convertie en force (Newton)
//--------------------------------------------------
void setup(){
......@@ -50,7 +50,7 @@ void loop(){
//Serial.print("Conductance en micro-ohm : "); Serial.println(fsrConductance);
// Approximation de la force en Newton
fsrForce = fsrConductance / 80;
newton = fsrConductance / 80;
//Serial.print("Force en Newtons: "); Serial.println(fsrForce);
}
......@@ -61,9 +61,9 @@ void loop(){
Serial.print("=> champ magnétique = "); Serial.print(gauss); Serial.println(" Gauss");
// Affiche la valeur du capteur de force (Tension/Newton)
Serial.print("=> Force Analogique = "); Serial.print(fsrAnalogique); Serial.print(" || Force en Newtons: "); Serial.println(fsrForce);
Serial.print("=> Force Analogique = "); Serial.print(fsrAnalogique); Serial.print(" || Force en Newtons: "); Serial.println(newton);
// attendre 1/10 de seconde
delay(1000);
// attendre 100 millisecondes
delay(100);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment