Running my script to wait for a GPIO button press (which prints some stats on al oled screen) takes my processor from 2% to 25%.
As soon as I press the button it goes down to 2% from 25% for 10 seconds while stats are displayed).
I have a simple while loop:
Code: Select all
while True:
if GPIO.input(15):
display_on_oled()
Can I do anything to make it use less resources?
Many thanks
Will