Search
  • Tyler Hammond

Question Time - LED and Buzzer Edition

Rather than using a button as an input device, I also began to use text entered by a user as input, which will send a command to a specific LED and sound the buzzer.


The best way to implement this was asking a question to the user. For example: "Who was elected as President of the United States of America in 2016?"


If the user inputs "Donald Trump", the Green LED will light up for a couple of seconds, and the buzzer will make a high pitched sound - indicating the correct answer has been given.


If the user were to enter "Barack Obama", the Red LED would light up, and a deeper sound will be produced by the buzzer - indicating the wrong answer has been entered.

4 views