Today we are going to make up a controller for a quiz with multiple choice questions.
It’s a very simple project, but it could be really funny to use to play with friends. It’ designed to answer to 3-choices questions.
First of all, we need:
- 3 LED of different colors;
- 3 220Ω resistances;
- 3 buttons.
The idea is this: when you press one button, the corresponding LED lighs up, and the controller send through serial port the information about which button has been pressed, and so which answer has been chosen: A, B, or C.
Connect the (few) components in this way:
Here is the source code. It sends through serial port the value ‘0’, ‘1’, or ‘2’, in case you have pressed the first, second, or third button. The possibility to choice an answer is allowed only after the controller receive an OK signal from the serial port: it means that the question has been presented to the players.