As it says in your photo, but in different words.
Any advice would be appreciated as I'm new to Python programming.
button_11 and button_12 are boolean variables - they are either True or False. (It would help to see the part of the script where their values are set.)
'on' is a string - a sequence of characters. You probably intend it to represent whether an LED, switch or other circuit has been turned on?
It is simply not meaningful to compare True/False with 'some characters'
One solution would be to use the constants provided by the RPi.GPIO library, which you have used elsewhere.
Something like -
Code:
if button_11 == GPIO.HIGH :
Statistics: Posted by B.Goode — Wed Jul 03, 2024 8:39 am