fixing bug

This commit is contained in:
talksik
2023-04-27 17:30:14 -07:00
parent 7165318972
commit 712efa85c7
+1 -10
View File
@@ -10,14 +10,6 @@ BUTTON = 17
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BCM)
GPIO.setup(BUTTON, GPIO.IN) GPIO.setup(BUTTON, GPIO.IN)
while True:
state = GPIO.input(BUTTON)
if state:
print("off")
else:
print("on")
time.sleep(1)
def robot(text): def robot(text):
print("executing command") print("executing command")
@@ -29,7 +21,7 @@ def sayScript():
print("initializing") print("initializing")
robot("hey Heran?") robot("hey Heran?")
robot("Based on your age, health, and habits, you have 10950 days left") robot("Based on your age, health, and habits, you have 10950 days left")
robot("Make sure you chant hare krishna more") robot("Make sure you chant more")
time.sleep(5) time.sleep(5)
robot("hey Kam?") robot("hey Kam?")
@@ -51,7 +43,6 @@ if __name__ == '__main__':
print("on") print("on")
sayScript() sayScript()
time.sleep(1)
except KeyboardInterrupt: except KeyboardInterrupt:
break break