from machine import Pin
from gpio_lcd import GpioLcd
import time
lcd = GpioLcd(rs_pin=Pin(6),
enable_pin=Pin(7),
d4_pin=Pin(8),
d5_pin=Pin(9),
d6_pin=Pin(10),
d7_pin=Pin(11),
num_lines=2,
num_columns=16)
j=0
k=0
p=0
button_red=Pin(0,Pin.IN,Pin.PULL_DOWN)
button_green=Pin(1,Pin.IN,Pin.PULL_DOWN)
button_blue=Pin(2,Pin.IN,Pin.PULL_DOWN)
lcd.putstr("BJP AAP CONG")
while True:
x=button_red.value()
y=button_green.value()
z=button_blue.value()
if x == 1:
lcd.move_to(0,1)
j += 100
lcd.putstr(str(j))
print("Voting is in progress!!!")
print (j)
time.sleep(1)
if y == 1:
lcd.move_to(6,1)
k += 1
lcd.putstr(str(k))
print("Voting is in progress!!!")
print (k)
time.sleep(1)
if z == 1:
lcd.move_to(12,1)
p += 1
lcd.putstr(str(p))
print("Voting is in progress!!!")
print (p)
time.sleep(1)