Quiz controller

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.

Here, some pictures of the controller:

Quiz 1

Quiz 2Quiz 3Stay tuned!

Romantic red heart

Who said that electronics can’t be romantic? We can use it to show a person our love, and it is exactly what we are going to do: a present, as simple to realize as wonderful to see, to give to the person we love. It could be a great gift for Valentine’s Day.

Let’s start: the idea is to realize a casket which has inside some little red LED arranged to form a heart shape. A switch turn the LED on and off. The device need four 1.5V AA batteries.

The final result is this:

Heart - Box Heart - Box open

Heart - On

The first thing to do is to get the necessary components:

  • a casket (the one I used was bought from Leroy Merlin, ~€2.50);
  • 27 red LED (~€5.70);
  • one 220Ω resistor;
  • one switch;
  • one battery case (4 AA batteries);
  • black cardboard;
  • soldering station (I used this one, ~€18.00).
  • moreover, it is useful to use a third hand (~€6.00) during the soldering.

Now that you have everything, we can start. First of all, you have to cut a piece of cardboard of the same height of the casket, but with a greater length: on one side, a flap will be sticked inside the casket, while, on the other, the cardboard encloses the battery case. My casket’s size is 12 x 6.5 cm, so the cardboard is ~16 x 6.5 cm.

Second step: design of the heart. Using a 2D vector graphics software (I recommend Inkscape), draw a heart, formed by 27 circles, diameter ~0.6 cm. This is the one I made:


Print it, place it on the cardboard, and make holes in correspondence to the circles: there you will place LEDs. I used a belt puncher.

The third phase begins: soldering. LEDs must be connected in parallel, that means every positive leg with the others positive, every negative with the others negative. I recommend to use a third hand and insulating tape.

Pay attention: don’t connect a positive leg with a negative one.

Most of the work is done: now you just have to connect one positive leg to the  220Ω resistance, and then to the switch (place in another hole in the cardboard). Finally, close the circuit connecting the battery case. This is the scheme:


Enclose the battery pack with the cardboard; on the opposite side, fold a little flap and stick it inside the casket.

Turn it on: it is simple, but beautiful!

Heart - On

Sorry for the bad quality of the pictures.

Stay tuned!

Color mixing lamp

Hello guys, today we are going to learn how to build up a “color mixing lamp”: a lamp that is able to change its color.

The project is really simple, as well as the required components:

  • a RGB LED;
  • three 220Ω resistances;
  • cables

You just have to connect the LED to GND and to Arduino, through the resistances. This is the circuit:

ColorMixingLamp Circuit Scheme


This particular kind of LED has 4 pins: three for the primary colors red, green and blue, and the fourth is the cathode. By creating a voltage difference between the cathode and the voltage coming out of the Arduino’s PWM pins, the LED will fade between the three colors. The longer leg is the anode.

Pulse Width Modulation

RGB LED obviously can show more than the three primary colors: you just have to modify the voltage on its pins (color value vary from 0 to 255).

For this reason, you will need the technique called Pulse Width Modulation, or PWM. It consists of rapidly turning the output pin HIGH and LOW over a fixed period of time. The change happens faster than the human eye can see. It’s similar to the way movies work, quickly flashing a number of still images to create the illusion of motion.

When you are rapidly turning the pin HIGH and LOW, it is as if you were changing the voltage. The percentage of time a pin is HIGH in a period is called duty cicle. When the pin is HIGH half of the period, the duty cicle is 50%. The higher is the duty cicle, the higher the voltage on the pin, and so is the value for the color.

Pulse Width Modulation

The board I use, Arduino Uno, provides six set aside for PWM (digital pins 3, 5, 6, 9, 10 e 11), that can be identified by the tilde ~ next to their number on the board.


This project need two programs:

  • the Arduino sketch, that reads terns of value in the format (r;g;b) from the serial and lights up the led of the right color (for example, “255;0;0” means red);
  • the Processing sketch, that catch the user input and send via serial the string for the chosen color.

Click here to download the complete package.

This is the final result:

ColorMixingLamp - Finished

Stay tuned!