Étape 5: Codage de temps !
Ont été allmost fait ! Télécharger ce code sur votre arduino :#include
#include
#include
Lcd Adafruit_RGBLCDShield = Adafruit_RGBLCDShield() ;
#define rouge 0 x 1
#define jaune 0 x 3
#define vert 0 x 2
#define TEAL 0 x 6
#define bleu 0 x 4
#define VIOLET 0 x 5
#define blanc 0 x 7
int sensorPin = A0 ;
float sensorValue = 0 ;
flotteur de tension ;
int mené = 13 ;
void setup() {}
Serial.Begin(9600) ;
LCD.Begin (16, 2) ;
LCD.Print("infared:") ;
pinMode (led, sortie) ;
}
int LED() {}
digitalWrite (conduit, en haut) ;
Delay(voltage * 500) ;
digitalWrite (led, faible) ;
}
uint8_t i = 0 ;
void loop() {}
sensorValue = analogRead(sensorPin) ;
LED() ;
lcd.setCursor (8, 0) ;
Tension = sensorValue * (5.0 / 1023.0) ;
lcd.setBacklight(VIOLET) ;
LCD.Print(voltage) ;
Delay(250) ;
}