I have, I think, a simple question. But I just can't wrap my head around it.
As an introduction:
I have a PS3 controller connected to the RPI from which I can read the input.
This I can read like:
Code: Select all
if(state['square'] == True):Code: Select all
if(GPIO.input(24) == True):So this is the question:
How can I do the following?
If you press the square button a LED-pin should go HIGH
if you press it again it should go LOW