Assignment 4 – Arduino Continued

Today is dedicated to the Arduinos.

Everyone picks a chapter in the Arduino Projects book. Last week I have to say I didn’t quite get everything that we did to get a working result. To understand the basics better I choose the first chapter. This also deals with lights, a component I will need for my final project.

I now get to know how the breadboard is structured. The two outer dots are each connected to the ones below them. The dots in the middle are connected within rows.


Light a LED with two switches (Parallel and Series Circuit)

The first task is similar to what I did in the last lesson: this time instead of one I use two switches to light a LED. I follow the instructions in the book and this time understand how it works. First I put the buttons in a series and then in a parallel circuit. In the series circuit it is necessary that both buttons are pressed to light the LED. In the parallel one it suffices to press only one.


The series circuit. Both buttons need to be pressed in order for the LED to light up.

Spaceship Interface

I am now more comfortable with the electronics and start with the next chapter. Here I build a « Spaceship Interface ». With three LEDs and a button. As long as the button is pressed the two red LEDs blink in an alternating fashion. When the button is first pressed and when it is released the green LED lights up once.


The code is as follows:

int switchState = 0;

void setup() {

pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(2, INPUT);


void loop() {

switchState = digitalRead(2);
if (switchState == LOW){
} else {








Publié dans Uncategorized