#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int cislo = 0;
bool x = true;
void setup()
{
lcd.init();
lcd.backlight();
DDRB &= ~(1<<0);
PORTB |= (1<<0);
lcd.setCursor(0,0);
lcd.print(cislo);
}
void loop()
{
if ( (PINB&(1<<0))==0 && x == true ){
cislo ++;
lcd.clear();
lcd.setCursor(0,0);
lcd.print(cislo);
x = false;
}
if ( (PINB&(1<<0))!=0 && x == false )
x = true;
}