</> const byte LCD[10] = {
B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,B01111111,B01101111
};
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,4,5,6,7);
int x = 0;
int i = 119;
int s =9;
int ds = 5;
int m=1;
int lcd_key = 0;
int adc_key_in = 0;
#define btnRIGHT 0
#define btnUP 1
#define btnDOWN 2
#define btnLEFT 3
#define btnSELECT 4
//Feux 1
#define F1V 16
#define F1O 15
#define F1R 14
//Feux 2
#define F2V 19
#define F2O 18
#define F2R 17
// Afficheur S1
#define LATCHS1 28
#define CLOCKS1 26
#define DATAS1 27
// Afficheur DS1
#define LATCHDS1 25
#define CLOCKDS1 23
#define DATADS1 24
// Afficheur M1
#define LATCHM1 22
#define CLOCKM1 20
#define DATAM1 21
// Afficheur S2
#define LATCHS2 37
#define CLOCKS2 35
#define DATAS2 36
// Afficheur DS2
#define LATCHDS2 34
#define CLOCKDS2 32
#define DATADS2 33
// Afficheur M2
#define LATCHM2 31
#define CLOCKM2 29
#define DATAM2 30
void setup()
{
Serial.begin(9600);
pinMode(A0, INPUT);
pinMode(F1V, OUTPUT);
pinMode(F1O, OUTPUT);
pinMode(F1R,OUTPUT);
pinMode(F2V, OUTPUT);
pinMode(F2O, OUTPUT);
pinMode(F2R,OUTPUT);
pinMode(LATCHS1, OUTPUT);
pinMode(CLOCKS1, OUTPUT);
pinMode(DATAS1,OUTPUT);
pinMode(LATCHDS1, OUTPUT);
pinMode(CLOCKDS1, OUTPUT);
pinMode(DATADS1,OUTPUT);
pinMode(LATCHM1, OUTPUT);
pinMode(CLOCKM1, OUTPUT);
pinMode(DATAM1,OUTPUT);
pinMode(LATCHS2, OUTPUT);
pinMode(CLOCKS2, OUTPUT);
pinMode(DATAS2,OUTPUT);
pinMode(LATCHDS2, OUTPUT);
pinMode(CLOCKDS2, OUTPUT);
pinMode(DATADS2,OUTPUT);
pinMode(LATCHM2, OUTPUT);
pinMode(CLOCKM2, OUTPUT);
pinMode(DATAM2,OUTPUT);
Serial.println("Feux de chantier Version 1");
Serial.println("Affichage des feux");
}
void loop()
{
Serial.println ("Feux Rouge 1 fixe, Feux Orange 2 Clignotant");
int btnRIGHT = analogRead(0);
if(btnRIGHT > 160) return btnRIGHT;
int btnUP = analogRead(145);
if (btnUP > 160) return btnUP;
int btnDOWN = analogRead(330);
if (btnDOWN > 345) return btnDOWN;
int btnLEFT = analogRead(506);
if (btnLEFT > 520) return btnLEFT;
int btnSELECT = analogRead (741);
if (btnSELECT > 760) return btnSELECT;
for (int x =0; x<120; x++)
{
</>