Project report 2 : Lab 2

Hello everyone,

For the second lab, we split our team in 2 groups. The first was on an Arduino board and the second was on a Raspberry PI. On the Arduino, we discovered the serial connection through some exercises. The serial connection is used to communicate with a computer thanks to his terminal. We learned to use analogic and digital inputs/outputs with push buttons, Leds, temperature sensor, potentiometer and switch.

This line set up the connection between the Arduino board and the computer with a Baudrate of 9600:


This line is writing whatever we want, and in this case, the temperature in the serial terminal on the computer.

Serial.println(“temperature: %d”, temp);

The second group worked with a Raspberry PI. As we didn’t have enough hdmi monitors for all groups, we remotely controlled the Raspberry using Putty (ssh protocol) and shell commands. The Raspberry PI was running on the Raspbian OS. Firstly, we began with some little exercises to handle basics shell commands:

  • Cd + directory: change directory
  • Mkdir + directory: create a directory
  • Rmdir + directory: delete a directory
  • Touch + filename: create an empty file
  • VI + filename: open and edit a file
  • Ls: display a list of existing files in the active directory

Secondly we started to use the GPIO to make a LED blink. Here is the code to make this possible:

import RPi.GPIO as GPIO


GPIO.setup(40, GPIO.OUT)

While i>10;

GPIO.output(40, GPIO.HIGH)


GPIO.output(40, GPIO.LOW)




We didn’t use the gpiozero library because they weren’t installed on the SD card.

See you soon,

Guillaume, Mathieu, Vincent, Kevin




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s