//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
int bpplus = 11 ;
int bpmoins = 10 ;
int bp = 9 ;
unsigned long interval,interval1=5000,
unsigned long currentTime=0;
unsigned long previousTime=0;
int x ;
int a;
/*class Opperation {
public :
int a ;
int getc(){
return c ;
}
void mul (int _a );
private :
int c;
};
void Opperation::mul (int _a );
{
c=_a;
}*/
void setup()
{
pinMode(bp,INPUT) ;
pinMode(bpplus,INPUT) ;
pinMode(bpmoins,INPUT) ;
Serial.begin(9600);
}
void loop()
{
currentTime=millis();
lcd.init(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
/*lcd.setCursor(3,0);
lcd.print("Bienvenue");
lcd.setCursor(3,1);
lcd.print("en BTS SN");
delay(5000);*/
lcd.setCursor(0,0);
lcd.print(x);
lcd.setCursor(3,0);
lcd.print("personnes");
lcd.setCursor(3,1);
lcd.print("ont valide");
delay(5000);
boolean etatbp = digitalRead(bp) ;
boolean etat = digitalRead(bpplus) ;
if (etatbp==HIGH)
{
a++;
}
if (etat==HIGH)
{
a--;
}
boolean ett = digitalRead(bpmoins) ;
if (ett==HIGH)
{
x=a;
}
}