Lab 3 : Raspberry and Arduino

For the lab of this week, our project group was still divide in two. One part use the Arduino. We did the same of last week but we use also the temperature sensor. To use this sensor, we have to connect it to the anagogic input. To have the temperature write in Celsius Degrees, we use an equation to convert into Celsius degrees.


The other part of the group worked on the Raspberry Pi. The first part was to establish a connection with the Raspberry. We connect the Raspberry and the computer on the same router with RJ45 cables. When we found the ip address of the Pi, we use Putty to make a connection. We discover how works a Raspberry, we created a folder. We save the files in this folder. As we didn’t have an internet connection to install the GPIOzero library, we used the RPI.GPIO library which was already install on the Raspberry. This library is used to interact with the outputs and inputs of the Raspberry. We use it to power a LED, to blink it. As input, we use a button. We program the Raspberry to use the button to light on the LED with a single pressure and let it on.


It was interesting to discover the Raspberry, but for our project we will use only the Arduino.

Laboratory 3 – Arduino : second part

For this third laboratory, we worked on the Arduino for more practice. After having connected the Arduino and the computer by the serial port, we went through some practical exercises. The first exercise consisted in a circuit including a logical switch whose position connects the card input to 5 volts or to the ground. To visualize the state of the input on the computer, we set the communication with Serial.begin(9600) and added a Serial.println(state), the variable “state” containing a value (1 or 0) depending on the tension applied on the input.

Then we changed the switch by a pushbutton. The difference is that the pushbutton does not provide a stable input as it comes back in its initial state once you do not put any pressure on it. The electronic circuit is a bit different but the trickiest part was to use it as a pushbutton must be used.

Finally, we used a temperature sensor as an input and a small program, considering the sensor data, to display the temperature on the computer screen. The first of the last two exercises involved the use of a potentiometer to represent a 0-5volts scale by 0-1 on the display. The second involved the use of five LEDs, to reincarnate the 1980’s slowest Trans Am ever made, by switching them sequentially on and off using delays.

Second lab on Arduino – ADaDeDuTon

In this laboratory, we used different functions from Arduino, of these functions:

  • pinMode
  • digitalWrite
  • digitalRead
  • analogWrite
  • analogRead

And the following functions for the communication with the monitor:

  • begin
  • println ()
  • write ()
  • read()
  • available

Different exercises were proposed to apply these functions. Depending on exercise, we chose the appropriate function.


Exercise 1:

Operation of the switch 3 pins:

It has 3 pins, a pin connected to GND (0V), a pin supplied with 5V and pin for reading the state (1 or 0) connected to an input of the Arduino.

For this first exercice, when the variables are declared, we used different functions. Firstly the serialbegin function to set the second bit data rate for the serial data transmission. Then the pinMode function to configure the specified pin to behave either as an input or output (pinMode (button, INPUT)).

The digitalRead function (button) was also used to read the state of the input connected and to save this state in an input variable. The Serial.println (ButtonState) function was used to display the data (1 or 0). A delay function () was used in the loop to repeat the loop all the 5ms

A condition if() was inserted to check that there is a state change


Exercise 2:

First of all there is a physical difference between a push button and a switch. The button consists of 4 pins connected 2 by 2 while the switch has 3 pins.

The electrical connection of the push button will be different from that of the switch. In addition, for the push button we need to integrate a resistor (pull-up resistor) connected to GND for receiving a clear signal of 0V. Otherwise external interferences may distort the signal 0V.

To display on the monitor if the button is pressed or not, we used the Serial.write function. This feature has been integrated into a “if” to analyze the state of the push button.

Using the pinMode function is assigned to an outlet for the lamp and an input to the push button. Then using the digitalRead function saves the state of one button, which will be used for the actuated or not the lamp using the digitalWrite function. We also used the delay function to avoid kickback.


Exercise 3:

To perform this exercise, we began by writting we equation to convert the voltage read in degrees thanks the equation of a straight line. To realize this straight line, we referred to the datasheet of the temperature sensor. Then we used the pinMode function to associate the pin input. Then we used the analogRead function to record the tension in a float. Finally we used the Serial.println fonction to display the temperature once it converted.



Project report 3 : Lab 3 – Raspberry Pi

The aim of this lab consisted to communicate with a raspberry pi and the computer, in order to manage applications such as turn-on a LED and make it blinking. The LAN connexion was established with a RJ45 and using SSH protocol. Moreover, as we used several computers and electronic circuits (raspberry), a router was also used.

In more details, to get the local IP of the Raspberry pi, we commonly used the default IP address ( in a web browser. Then, we ran putty to make a secure connexion and communicate with the raspberry pi, the authentification name was « pi » and the password « raspberry ».

After that, as we didn’t have access to the internet and the Raspberry in the same time, we began to transfer the GPIOzero library by using WinScp. Unfortunately, the full installation of this package required internet. In consequence, the installation was incomplete, so we used the RPi.GPIO library already installed in the Raspberry.

At this step and after some manipulations (turn on a led, blink it,…), we tried to connect and control the Arduino which the programming language is Arduino (C/C++) and the raspberry pi (Python language on a Raspbian OS).

The physical link between them was a USB cable, so we used a specific library so-called “Serial” to send information (blink a led, …) and receive information (eg: what’s the value of a potentiometer).


Di Bartolo Vertessen Bouazza Pensis Simon

Project report 3 : Lab 3, planning and list of components

Hello everyone,

During Monday’s lab, we improved our skills and our knowledge about the Raspberry PI. We discovered the “nano” editor which is easier to handle than the “VI” editor. We manipulated the PI to remake a part of the laboratory on the Arduino board.

Beside the lab, we named the project “Basilic project” and  made a planning of different tasks which must be done on the Asana’s platform.


Asana Project

We also sought the different components that we need for the project by thinking of necessary power supplies and powers of the components. We visited several websites in order to find the better price. At beginning, we thought to use an electrical jack (used to open a window of the greenhouse) but it was too expansive, so we replaced it by a servomotor cheaper.


For the next week, we are going to start the reflexion and the programming of the Arduino board (When we’ll receive it) and draw the first version of the electrical design.

See you soon,

Guillaume, Mathieu, Vincent, Kevin

First week of project: what are we going to do???

Hello guys,

With my project’s team, we had to choose a subject this week. We want to find a project that can be used every day and that can simplify the life. At the end of this week, we had several ideas but anything concrete. Some ideas can be improved next week such as the automatic hood, « boil never burnt » or « heat your water easily ». These different themes always revolve around the kitchen because it’s a room that everybody use every day and then we said we that there was something to do in this theme.

Normally we think to start our project in working with an Arduino board and we will see later if we will need to use a raspberry.

See you soon,


Last Training Lab & final project idea

Hi everyone,

This week we finally found our final idea for the project. After consultation, we started on the idea of medical diagnosis. Indeed, the idea of laser projection for “Kart Battle” seemed a little fuzzy as to the diagnosis we already know what kind of sensor we will use for the project.
The project will involve a measure of heart rate of a patient. Then we ll send this information on a secure website or directly to the doctor so that he can check the vital factor of his patient at any time.
The project will consist of a cardiac pulse sensor, an Arduino and a Raspberry Pi. We ordered the Arduino and Raspberry Pi this week.

In the lab, we have learned to use a Raspberry Pi and the associated coding language (Python). To use the Raspberry we had to download the “Putty” program to be able to code. The installation and initiation of the program was a bit tricky with the search for the IP address and the fact that we create everything from a specific encoding in the program (example: a new file).
We performed the same exercises with the Arduino but this time with Rasberry: to light a LED, to blink a LED, to use a push button to turn on the LED and to use a push button with a memory function for the LED stays on.

For the next week we will reflect in more detail on our project because it is the beginning of labs allowing us to work on our project.

See you later Aligator