Video 4 Project Protected house

Hello, I am corentin clavie and today I am going to explain to you the libraries that we need for this project.

For the presentation, we have separated libraries for python and Arduino.

In first time, I am going to explain the common library.

Arduino and raspberry need to communicate together. The serial Library is a library who allow to Arduino and raspberry to communicate together by the USB serial port.

To use this library, we need to write in Arduino and raspberry script a short code. That code informs the both about the speed to communicate together. In Arduino, we don’t need to import library in the beginning of informatic code because all libraries are included in the IDE. For the raspberry, we need to import the library as I show you on video. After we need to specify the USB port used to communicate with Arduino and finally we need to specify the writing and reading frequency.

For Arduino, we use basic libraries with Input and output to specify which Pins are used to control actuators and which others are used to read the sensor state.

We use the serial library to write and read on the USB serial port. Therefor we use the command serial.printline and the command  as I show you.

That library allows us to send sensor and actuator states on raspberry.

The raspberry can send all these information’s by wi-fi to another computer or a smartphone.


For the raspberry we use three different libraries: Tkinter, time and serial.

The serial library is used to allow to Arduino and raspberry to communicate together as I explained to you before.

The Tkinter library are used to design our personal graphic interface with python code. We used the button, label and input command of Tkinter.

The button command allows us to send messages to the Arduino by the serial port to command actuators.

The Label command is used to show the different state of the sensors. If the sensor is On or Off, we use different Label parameters to change the text colour.

And the input command allows us to require password to change the alarm state.

The grid command allows us to manage the graphical interface as we want.


The time library is used to make pauses in the script. When we use the serial, we need to make some pauses to not superpose two different messages.

Therefore, we make the program sleep for one millisecond before writing the second message.


For the moment, we don’t finished the script and we still looking for different solutions who allow us to remotely control the raspberry and to send one SMS to the owner’s GSM.

For the remotely control, we need to use TightVNC to connect smartphone and raspberry by wi-fi. TightVNC and androidVNC are used together to remotely control the raspberry.

For the SMS shield, we need to use the GPIO, OS and Serial to send a SMS to the owner but we can’t explain the functionality for the moment.

I hope you are interested by our project and we will show and explain to you the python and Arduino script in the next Video.

Have a wonderful day and still interested by informatic coding.

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