Arduino Programming Workshop

Posted on

After learning how to weld I attended the programming workshop (last thursday, November 3rd). This introduced me to some programming notions (in C – a programming language) that I applied to the Arduino built the previous week.

The purpose of the workshop was to program a game. For this, we installed in our computer the “arduino” program (used to program the game). We were then given some more components to connect to the arduino (a breadboard, some wires, two buttons, a few more LEDs and resistances). We connected the new components to the breadbord which, in turn, was linked to the arduino. We then proceeded to the programming part.

The game tests the attention and speed of the two players. At the beginning, each player has three red leds (three lives) and one button. There is also a central led whose color changes randomly during the game (alternating between green, red and blue). When the led is green, the player who presses the button faster takes a life out of his opponent (turning off one of his opponent’s three leds, who now has two lives). Someone who presses the button when the central led is red loses a life. Someone who presses the button when the central led is blue receives a life. A player wins when his opponent has no more lives left (the opponent’s red leds are all off).

The workshop was definitely worth it. I had a great time and felt that I had learned a lot. The notions learned will certainly be useful in the programming course of the next semester.

 

Here are some photos and a video of the final product:

img_1837-copia        img_1838

programa
A sample of the program

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *