IOT GPIO 1 – sound and light

Assignment 2: Physical inputs and outputs, Internet of Things

Learning how to use LED lights in class, I tried to combine them with sound. So I used the say.js and gpio.js packages to complete the assignment.

Say.js uses the Festival speech synthesis system, supported by Linux, to convert text defined in the code to sound. While GPIO controls the switching on and off of the LEDs.

I combined the two to show the changing of the lights. When the green light switches on, the pi says ‘Hi! Turning light green.’. Whereas, with the red light on, it says ‘Bye! Turning light red.’

A similar system is used at certain traffic light to notify blind pedestrians for crossing. The sounds they usually use are single chirp sounds or beeps. Below is a link from youtube to show how that works in reality.