#active buzzer code
loco_iot.enable(msg.SUBTYPE_DO_1)
data = [1]
loco_iot.setData(msg.SUBTYPE_DO_1, data)
time.sleep(2)
data = [0]
loco_iot.setData(msg.SUBTYPE_DO_1, data)
#code lcd
loco_iot.enable(msg.SUBTYPE_LCD)
data = [4, 1, ord('a')]
loco_iot.setData(msg.SUBTYPE_LCD, data)
data = [5, 1, ord('b')]
loco_iot.setData(msg.SUBTYPE_LCD, data)
time.sleep(5)
5a) Push button + LCD + Buzzer + LED
Write a Python program to create two polyphonic tones using the Buzzer and a push-button to switch between the two tones. Interface the LCD to display which tone is currently being played, and an LED to blink at random intervals when
Comments
Leave a comment