<s> '''<STR_LIT>''' <EOL> import time <EOL> from grovepi import * <EOL> import math <EOL> buzzer_pin = <NUM_LIT:2> <EOL> switch_pin = <NUM_LIT:4> <EOL> pinMode ( buzzer_pin , "<STR_LIT>" ) <EOL> pinMode ( switch_pin , "<STR_LIT>" ) <EOL> while True : <EOL> try : <EOL> switch_status = digitalRead ( switch_pin ) <EOL> if switch_status : <EOL> accl = acc_xyz ( ) <EOL> print "<STR_LIT>" , accl [ <NUM_LIT:0> ] , "<STR_LIT>" , accl [ <NUM_LIT:1> ] , "<STR_LIT>" , accl [ <NUM_LIT:2> ] , <EOL> if accl [ <NUM_LIT:0> ] > <NUM_LIT:16> : <EOL> digitalWrite ( buzzer_pin , <NUM_LIT:1> ) <EOL> print ( "<STR_LIT>" ) <EOL> else : <EOL> digitalWrite ( buzzer_pin , <NUM_LIT:0> ) <EOL> else : <EOL> print ( "<STR_LIT>" ) <EOL> time . sleep ( <NUM_LIT> ) <EOL> except KeyboardInterrupt : <EOL> digitalWrite ( buzzer_pin , <NUM_LIT:0> ) <EOL> break <EOL> except ( IOError , TypeError ) as e : <EOL> print ( "<STR_LIT>" ) </s>
