Homework due Monday October 16

For this homework, we had two different parts to complete: a self portrait and familiarising ourselves with the for() loop to create different rectangles. 

Self portrait:

I had a hard time figuring out what way would be the best of making some things work. I want to thank Kate for her help and because she kept on asking me to add more details to make it more realistic. I hope she likes the result.



The rectangles change colour (randomly) and position (both in the x and y axis). I also created a similar version of the code without the for() loop. It is quite cool, so I will add it later in the comments.


Homework due Wednesday October 11


In order to emulate human movement, I decided to use one of the most recognisable faces (Cristiano Ronaldo’s) and one of the most popular entertainments of the world: football. My project emulates Cristiano shooting a penalty.


First I tried to use a motor and a transistor, but the spin was way too fast, so I decided to switch to a servo. Then the project worked much better so I decided to finalise it with my servo. 

Also the glue got all the photo of CR7 very dirty, which was very unfortunate because I have not had time to fix it. 








Homework due Monday October 9


Hi all! This whimsical project is an old controller that plays tunes whenever you push any of the buttons. When you push button 1 and 2 simultaneously it plays the Imperial March. When I started working on the project, Michael offered to help me with re using the original board. Thanks for that! 

We did the soldering and everything was looking fine, but when I uploaded the code, I discovered that there were short circuits between several pushbuttons. After that, I tried to “fix” the board by trying to break every possible circuit that I wasn’t using. After a long process I wasn’t able to figure it out so I had to repeat the circuit in a piece of cardboard.

My advice would be: perform a connectivity test with the multimeter before soldering any components, and be through in your study of the circuits before using them.

Also, another problem I had was adapting examples of songs uploaded to the internet to the code. I only managed to upload the Imperial March (which I had adapted previously) and am looking at adapting more songs in the near future so that I can make a more complete version of the project. 

Materials used:

  • Breadboard
  • Redboard
  • Wires
  • 8 pushbuttons
  • 8 x 10K resistors
  • A red LED, and its correspondent 330k resistor
  • A speaker from the speakers box
  • A box painted with black acrylic paint 
  • A controller rescued from the junk shelf





About May’s project:

May created a version of the useless machine that unplugs itself from the power source. Although it was powered with Arduino, the program didn’t require any coding, which was a really cool way of making a straightforward and cool project that didn’t demand coding knowledge from anyone to do it at home. 

I think the car was a very nice project to play with!

Homework due Monday October 2


Here is a simple piano that uses some LEDs, a servo and a buzzer to create music. It is built inside a box and surrounded by a lot of tape. Check under the instrument for extra info.

Problems & design improvements:

While building it, due to the lack of pins to connect pushbuttons and LEDs I ended up using the pin 0, which caused a big headache and made me believe I had created a short circuit. I went full OCD and I took the instrument apart and rebuilt it. Turns out I just shouldn’t have used pin 0.

I would have loved to introduce a switch in the connection to the buzzer, making a mute version of the piano (only LEDs) and a proper version with sound. Furthermore, I would have loved to add a flex sensor in order to make it more futuristic and versatile.

I ended up going for a safer code so that I could have time to work on the design and appearance of the project. I am pretty happy with the outcome and I believe that the little instructions sticked under the instrument  are quite helpful. Next time, I want to explore with a more complicated code and a more innovative design concept. At least there’s room for improvement !!!!




Pictures & video:

Homework due Wednesday September 27

Here is a mini piano, it works with three buttons, a servo and a buzzer. Below you will find the schematics and the code. Cheers.



Homework due Monday September 25

Hi all, it took me a while how to figure out the simplest version of the code. At first, I worked with for statements, then if value is HIGH or LOW, and then I finally realised that the simplest version would be with a if and then else statement (c/o May).

Here is the schematics:

Below you will find the simplified version of the homework. If you keep scrolling, you will have a chance to listen to the Imperial March played by your servo. Cheers!

Here is the full nerd version of my homework. Check it out, the March rocks. 


Homework due Wednesday September 20

For this assignment, I have used the servo to indicate what meal of the day one should eat. Basically, the LDR gives the motor indications of how much it should rotate to indicate each meal. Therefore, if it is very sunny, the servo will rotate to its 10º position, which indicates breakfasts. When it is less sunny, it will indicate an appetiser (45º), then lunch (90º), coffee (135º) in the evening and lastly, when it’s darker, dinner (160º) time. 

Here is my schematic. The code is below. 



Homework due Monday September 18

This assignment was divided in three parts. The first part inquired about the differences between the commands Fade and Fading; the second part requires us to print several values and the third part is related to the blink without delay command.


Both commands accomplish similar outcomes but there are several differences.

In the “Fading” case, you have to manually set up the fading loop, indicating that it starts at 0 and finishes at 255, and then do the same thing the other way around (255 to 0), and you can not perform the fade of two LEDs simultaneously. This means that you need to have one LED (blue in my code) go on, then another one (red) and so on and so forth. Check my code below. 

When using “Fade”, you set up a default brightness and to that value you add a fade amount that makes the led reach the 255 brightness. When 255 is reached, the program turns the Fade value into negative and keeps adding it. Then it does the same when it reaches 0. This command can be run simultaneously in as many LEDs as you want, which is great when you want to create simultaneous loops. 


Here, we print the values of HIGH; LOW; A0 and LED_BUILTIN. It shows us that rather than having to write LOW in a digitalWrite, we could use 0; instead of writing LED_BUILTIN when specifying an output we could use 13 and so on and so forth. 


Here, we have used a blink count to control how many times the LED has blinked. It is VERY important to understand how the command millis() works, so I recommend these tutorials to learn a bit more: BaldEngineer and Arduino.

Check the code below.


Homework due Wednesday September 13

Diego Arias


Here’s the third assignment in which I changed the intensity of the led through the analogWrite() command.


  • Redboard + breadboard
  • 2 * LED (I used blue & yellow)
  • 2 * 330Ω resistors
  • 3 * wire (1 to connect the LED to GND, 1 to connect the yellow LED + resistor to digital pin 3, 1 to connect the blue LED + resistor to digital pin 9) 

I will share the first and second versions of the assignment. In the first, I set it up as a fade that would gradually and softly increase the brightness from 0 to 255 increasing by 5 and then from 255 to 0 decreasing by 5.

The schematics are done with Fritzing, check the software out here

Here is the code for the first version of the assignment.


After talking to Michael, he made me realise that it should be done a different way, which is assigning several brightness intensities to the led and making them run one after another instead of a smooth routine. Here is the code for the 2nd version of the homework.



Homework due Monday September 11

I have tried to upload screenshots of all my work with the code but they upload as very low quality so I will upload them to a Drive folder and share the links here.

Part 1: Led circuit


Part 2: LDR


Pard 3: Interaction between sensors and LEDS