gpio routines updated
This commit is contained in:
@@ -10,11 +10,7 @@ from sys import exit
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
import pygame
|
import pygame
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
try:
|
|
||||||
import RPi.GPIO as GPIO
|
|
||||||
except RuntimeError:
|
|
||||||
print("Error importing RPi.GPIO! This is probably because you need superuser privileges.")
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
### Configuration ###
|
### Configuration ###
|
||||||
@@ -250,11 +246,11 @@ def setup_gpio():
|
|||||||
|
|
||||||
def teardown(exit_code=0):
|
def teardown(exit_code=0):
|
||||||
display.teardown()
|
display.teardown()
|
||||||
# GPIO.cleanup()
|
GPIO.cleanup()
|
||||||
exit(exit_code)
|
exit(exit_code)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# setup_gpio()
|
setup_gpio()
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
display.mainloop(image_idle)
|
display.mainloop(image_idle)
|
||||||
|
|||||||
Reference in New Issue
Block a user