User Manual
time.sleep(0.1)
# Move mouth back and forth
def talk(t):
for _ in range(t):
myservo.angle = 150
time.sleep(0.1)
myservo.angle = 180
time.sleep(0.1)
filenum = 0 # counter to play all files
while True:
gc.collect()
print(gc.mem_free())
# time to play the bongos!
bongo(5)
time.sleep(1)
# OK say something insightful
play_file(wavfiles[filenum])
# and move the mouth while it does
while a.playing:
talk(1)
# Done being insightful, take a break
time.sleep(1)
# If we went thru all the files, JAM OUT!
filenum += 1
if filenum >= len(wavfiles):
bongo(20)
filenum = 0
© Adafruit Industries
https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-
construction-kit
Page 131 of 201










