Je ne comprends pas ce message d 'erreur :
Merci à vous !!!!'void loop()':
arrosagebacV1:15:65: error: expected primary-expression before ')' token
digitalWrite(in2, HIGH);
voici le programme complet :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 const int in1 = 2; ////declanchement pompe const int in2 = 3;//alim 5V test humidite int humiditeValue = 0; int bacplein = 0; void setup() { // put your setup code here, to run once: pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); Serial.begin(9600); pinMode(A1, INPUT); pinMode(A2, INPUT); } void loop() { digitalWrite(in2, HIGH); ); Serial.print("test"); delay(3000); humiditeValue = analogRead(A1); Serial.print(humiditeValue); if (humiditeValue < 350 ) { do { bacplein = analogRead(A2); digitalWrite(in1, HIGH); Serial.print(humiditeValue); delay(100); Serial.print(bacplein); delay(100); } while (bacplein < 600); digitalWrite(in1, LOW); Serial.print("fin arrosage"); } delay(100); digitalWrite(in2,LOW); Serial.print("repos "); delay(6000);}
Partager