I'm having this issue with an LCD display using the Adafruit library. My program checks with a while loop if an input it's true or false. My question is if it's possible to make that blinking stop? This is the program:
Code: Select all
import RPi.GPIO as GPIO
import time
from Adafruit_CharLCD import Adafruit_CharLCD
GPIO.setmode(GPIO:BCM)
lcd = Adafruit_CharLCD()
GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
lcd.begin(16, 1)
while True:
door = GPIO.input(5)
lcd.clear()
if door:
lcd.message ('Door Open')
else:
lcd.message ('Door Closed')
time.sleep(2)