Last active
May 29, 2017 18:54
Segment of Google AIY main.py pertaining to triggers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if args.trigger == 'gpio': | |
import triggers.gpio | |
triggerer = triggers.gpio.GpioTrigger(channel=23) | |
msg = 'Press the button on GPIO 23' | |
elif args.trigger == 'clap': | |
import triggers.clap | |
triggerer = triggers.clap.ClapTrigger(recorder) | |
msg = 'Clap your hands' | |
else: | |
logger.error("Unknown trigger '%s'", args.trigger) | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment