Craft brewery: libraries

Brewery – Dead link

New link : Libraries

Hello everybody, I am Arthur Renard and for my electronics project I will present yourseelf our differents libraries.

The different libraries that I am going to speak about are the one we used for programming our raspberry pi.

At the beginning we had to install raspbian on our raspberry. For this task, we had to create a bootable SD card and we did it with the ApplePi Baker software. When the SD card has been made we put it in the raspberry and we powered the raspberry. Lots of lines appeared at the screen, we wrote sudo raspi-config on the keyboard. Then the interface appeared, from this moment we had to change the language, the QWERTY keyboard to the AZERTY and we changed the password.

Now i’m going to present you the two methods of connexion: SSH and the VNC connexion.

The ssh is used with the terminal of the mac and we had just to know the IP of the raspberry and to write ssh pi@ IP ADRESS. Then it configures itself and now we are able to use the raspberry without screen an keyboard. Only with the mac.

The second method is the vnc, it is able to control the raspberry with the mac. For this step, we had just to install the vncserver on the mac and on the raspberry. After the configuration we can use the rasperry with the mouse and the keyboard of the computer.

Then we need to install the module RPI.GPIO. The module allow an connection between the Raspberry and the breadboard.

We will now install the Apache web server that allows the machine to analyse the requests coming from the user and return the file matching with this request. With Apache we are now able to use HTML contents.

To use our web page we will now have to use PHP contents. PHP is one language that is read and executed directly on the server (the raspberry). After the server send it on the HTML web page.

Now that everything is made we will have to do the code on the raspberry but that is for one other video.

Thank you for listening see you soon!

Brewery project : The libraries

 

Hello,

Here’s our third video talking about the libraries we are going to use for our Brewery Project. Libraries are important because they allow access to functions that are not present by default on the device such as Arduino or Raspberry Pi.

Let’s start with the libraries of the arduino:

#include <LiquidCrystal.h> => This library displays process steps and temperatures on an LCD screen. We do not need to install other libraries for our project, the rest is already integrated into the program. However, we could perhaps add the following few libraries, but we do not know yet if they will be useful.

PID => This library would improve our heating phase, but we have to test our installation physically in order to know if this is really useful.

TIMER => This library could be useful if we encounter problems using the millis () function. Moreover, in some libraries of this kind, a PWM function is sometimes present which could be useful to us on the control of our mixer in order to make it run at different speeds.

#include <toneAC.h> => Allows you to output sounds that are more specific and better than those built into the program.

So its finished for the Arduino, let’s now go to the libraries to use for the Raspberry Pi:

Import serial => It is to make the communication between the Raspberry Pi and the Arduino to get the data or to send data from the raspberry in python

Tkinter => From Tkinter import * (“*” to take all functions) => To create a graphical interface to view temperatures, steps etc ….

 

Thank you for following us,

See you next week for the next video !

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 serial.read  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.

Team 8 – Secured & Automated Front Door #3 – Libraries

Hello,

A major part of the code is on the Raspberry and we will therefore use libraries under python:

String              will allow us to manipulate the strings and to transfer the informations recorded                         by the Arduino to the Raspberry

Math               is a library that we could use in the code of our alarm and meter

Time                is a library that will be useful to time our alarm

Serial               is the library allowing communication between Arduino and Raspberry

Logging           could be used to increase the security of our installation

Socket             will be required to connect the app and the Raspberry

 

We will also use some Arduino libraries because the control of our stepper motor will be encoded on it.

Servo               which is useful for controlling a servo motor

AccelStepper  which is an improved version of the Stepper library on several points including:               it supports acceleration and deceleration and it supports 2, 3 and 4 wire                             steppers, plus 3 and 4 wire half steppers.

MultiStepper  can be used to support devices with multiple steppers on a multiple axes to                                 cause linear diagonal motion

See you soon for the next post!

Data acquisition – Libraries

Hello everyone,

Here is the description of the libraries we use for our project.

1. spi.h : Serial Peripheral Interface (SPI) is a serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances.

It can also be used for communication between two microcontrollers.

2. mcp_can.h : Library of functions for the Canbus chipset and the Canbus shield SEEDUINO.

3. sd.h : The SD library allows for reading from and writing to SD cards. The library supports FAT16 and FAT32 file systems on standard SD cards and SDHC cards. The communication between the microcontroller and the SD card uses SPI.

4. softwareserial.h : The SoftwareSerial library has been developed to allow serial communication on other digital pins of the Arduino, using software to replicate the functionality.

5. adafruit_fona.h : This is a library for the Adafruit FONA Cellular GSM. It contains the required functions to operate the SIM808 chipset we use.

6. EventManager.h : this library provides an event handling system for Arduino.

7. mstimer2.h : MsTimer2 is a small and very easy to use library to interface Timer2 with humans. It’s called MsTimer2 because it “hardcodes” a resolution of 1 millisecond on timer2.

Chickens’ counter attack

To remember our team works on an automated chicken house.

This post is about the libraries that we are going to use in our program.

Python library

To create the graphical interface, we have used the TKinter library. This library allows us to build different kind of windows using widgets.

In the first instance, the interface will be used to display:

  • The water level;
  • The food level;
  • The humidity;
  • The temperature;
  • The date;
  • The hour of the day;
  • The time of the day according to the light sensor: day or night.

Secondly, the interface will be used to enter:

  • The value of the brightness threshold

Arduino library

To control the motors, we are going to use an Arduino library. But we haven’t yet chosen the type of motors. If we used stepper motors, the library that we are going to use is the stepper library and if we used servo motors, the library that we are going to use is the servo library. Thanks to these libraries we can easily and precisely control our motors.

Raspberry library

To realise the Internet connection, we are going to use a Raspberry library. But at this moment, we haven’t yet found the library that will allow this operation.

Examples of software

We have mainly used the references of our sensors to find some examples of software that could be useful to carry out the different functions of our project:

  • The count of chickens
  • The control of the presence of eggs
  • The monitoring motors
  • The temperature control
  • The luminosity control

That’s all for the moment. But later we might decide to use more libraries. If we do that, it will be explained in the next videos.

 

That’s all folks!

Team 4 : Drugs dispenser – Software libraries (third post)

The video

Python libraries

Hello, this post is about the libraries that we are going to use in our python program. At first, we had decided to create a website using the library flask but we realized that it was not needed that the application was available online.  So we decided to simply create a graphic interface using the TKinter library.

The TKinter library allows us to build different kind of windows using widgets (like Checkboxes or buttons,….). The interface will be used by the user to enter the names of the patients and the different medicines he has to take on different times of the day.

There are other libraries that we are going to use but we didn’t talk about them in the video because we didn’t know that we were going to use them at the time we made the video.  These libraries are pyserial and maybe hashlib.

The purpose of pySerial is to be able to send data from the raspberry Pi to the arduino. This is needed to tell the arduino which medicine and how many he has to drop in the cup.

The last one is hashlib. This library is used to encrypt data using hash algorithms. We would use this library to encrypt the password the user must enter to access the python software. But we are not sur yet wheter a password will be required or not to access the software.

Arduino libraries

In arduino, the only library that we are going to use is the stepper library to control our stepper motors. Thanks to that library, we can easily and precisely control our motors.

This is it for the moment, but later we might decide to use more libraries. If so, it will be explained in the next videos.