first commit
This commit is contained in:
28
Gaz/Gaz.ino
Executable file
28
Gaz/Gaz.ino
Executable file
@@ -0,0 +1,28 @@
|
||||
void setup()
|
||||
{ Serial.begin(9600);
|
||||
pinMode(10, INPUT);
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
|
||||
float vol;
|
||||
int sensorValue = analogRead(A0);
|
||||
int sensorValue2 = analogRead(A1);
|
||||
int sensorValue3 = analogRead(A2);
|
||||
int sensorValue4 = digitalRead(10);
|
||||
|
||||
vol = (float)sensorValue / 1024 * 5.0;
|
||||
Serial.print("Valeur 1=");
|
||||
Serial.print(sensorValue);
|
||||
Serial.print(" Valeur 2=");
|
||||
Serial.print(sensorValue2);
|
||||
Serial.print(" Valeur 3=");
|
||||
|
||||
Serial.print(sensorValue3);
|
||||
Serial.print(" Valeur 4=");
|
||||
|
||||
Serial.println(sensorValue4);
|
||||
//Serial.println(vol, 1);
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user