Question: Write a small loop python code that accomplish the following tasks: - A continuous loop with a while True statement will monitor whenever a switch
Write a small loop python code that accomplish the following tasks:
- A continuous loop with a "while True" statement will monitor whenever a switch is press or not
- by updating a boolean EnableFlag using GPIO pin of a raspberry pi 4
- Add a if statement to check and see if the button has been pressed, passing the boolean as the argument
- If it is true, then print the value. If it is not true, then do nothing.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
