Im working on a project where i want to use i sound sensor to alert me when its activated. I´ve tried using sound_sensor.py file and just modify it to send me a notification on twitter. this might be naive of me, but can i just add part of the code found in the wifi_twit.py?
something in the lines of:
# Read the sound level
sensor_value = grovepi.analogRead(sound_sensor)
# If loud, illuminate LED, otherwise dim if sensor_value > threshold_value: grovepi.digitalWrite(led,1) print (what ever i want the message to be) api.PostUpdate(what ever i want the message to be) else: grovepi.digitalWrite(led,0)