Skip to content

Instantly share code, notes, and snippets.

@uktechreviews
Created April 20, 2017 07:35
Show Gist options
  • Save uktechreviews/62da73d5861c80823727a46fe94c6969 to your computer and use it in GitHub Desktop.
Save uktechreviews/62da73d5861c80823727a46fe94c6969 to your computer and use it in GitHub Desktop.
def check_answer(expected):
while True:
if sensor.touch_status_changed():
sensor.update_touch_data()
if sensor.is_new_touch(expected):
if expected !=99:
print ("Correct")
state = True
return state
break
else:
if expected !=99:
print ("Incorrect")
state = False
return state
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment