Team 4 : Drugs dispenser – software explanation (fifth post)

In this post, we will describe how the software has been developped. At the time we made the video, everything wasn’t completely finished yet. That’s why, we didn’t talk about the fact that to run the software, the user has to enter a password and a login. In order to add that to the software, we have created a new class called mdpWindows which contains the information about the password and the login and the different widgets of the window.

Concerning the arduino, there’s not much to say. The idea is that the arduino receive the information (from the rapsberry, using the serial connection) about which motor has to be driven and how many step it has to do.

Brewery project : Software

Hello everybody!

Today, we are going to explain the informatic code of our project: A brewery.

First, you have to know that we use an Arduino and a Raspberry in our project. About the code in the Arduino, we have worked with several steps. A variable named étape, which increases itself at the end of each step, allows to jump to the next step. The brewing process requires several heating phases and several temperature regulation phases. So, when the user pushes on the button, the variable étape change from 0 to 1 therefore, the code can go to the step one. The step one is a heating phase until 68°c. when the temperature is over 68°c, the variable étape change from 1 to 2 therefore, the code can go to the step 2. The step 2 is a temperature regulation phase. Here, the code regulates a temperature of 68°c during 1 hour. The step 3 and the step 4 work on the same way but with a different temperature. During these 4 steps, the mixer operates. The step 5 is an alarm to prevent the user that he has to decant the beverage from the first tank to the second. In the second tank, there are the same steps but with different temperatures. About the raspberry code, it allows to show the number of the step, the temperature of the beverage and the countdown.

The project is nearly done. The next step is the electrical connection between each component.

Thanks for following us!

Team 2 : Automated board game : Software

Hello everyone,

In this post we are going to globally explain you the code we need to make our project work but first we are going to quickly explain you how the game works.

About the game :
The game is divided in two phases. The goal of the first one is to share all the tokens between the losers. Depending on how many people are playing, we usually play with either 11 or 13 tokens. During the first phase, every player has to roll the dice once and whoever gets the lowest combination receives tokens. The number of tokens he receives depends on what the biggest score is. We keep doing that until there is no more tokens to give.
Now the second phase begins. The only people participating are the ones who received tokens (therefore who lost at least one turn during the first phase). The goal now is to get rid of all your tokens. The player who starts a turn of table is now allowed to choose if he rolls the dice once, twice or three times as he is playing. Once he’s done all the following players have to try and beat the best score with the same amount of rolls. Whoever gets the lowest score loses and receives tokens from the player who got the best score (the number of tokens once again depends on the best score achieved). When one player has all the tokens, the game is over.

About our code : 
We can divide it in 3 parts. The first two are used by the Raspberry to make the interface and the game. The third one is used by the Arduino to drive the motor.

First, we made a code which we use to follow the flow of the game. To do so, we translated the rules of the game into an algorithm and then added the code that counts the dice and the score of each player.
The tricky part here is what treatment we have to carry out to be able to count the dice and the score thanks to the picture our camera has taken.
The first step is to crop the picture so all we see is the gaming plate with the 3 dice on it. Afterwards, we have to use a RGB filter and a threshold (we are using white dice on a green background) to split the colors and fetch the dice (using contours). Once we found the 3 dice, we can start counting how many pips there are in each dice using smaller contours. To make it simple, we find big contours who symbolize the dice and then smaller contours who symbolize the pips. To count the score, we only count contours between a minimum size (size of a pip) and a maximum size (size of a dice).
We then have our result stored in a matrix [nbr of 1’s; nbr of 2’s;…;nbr of 6’s]. The code is also able to count how many dice there are on the gaming plate and to know if a dice is erroneous.

The second part is the one we use to make our interface. We were fairly new to making interface using python so we basically learned ourselves how it works.
Our interface is composed of a few pages. The first one is the “home” page where you can choose what game you wanna play. For now, the only game we developed is the one we explained earlier. The second page is used to choose how many people are playing and what’s their name. After that we have another page for the first phase and one for the second phase. Their goal is to show the score of each player, how many tokens players have and all the information useful to the game itself. Moreover, we are also planning on making a “settings” page that would allow the players to change the sense and speed of rotation of the gaming plate, for example, but we’re not quite sure yet.

The third and last part we made is the one that’s going to drive the motor to make the gaming plate rotate in the right position at the right time. The arduino receives information about the position the gaming plate has to be in next. It then uses this piece of information to drive the motor until the gaming plate is in the right spot.

Our code could be updated a bit later because our model isn’t 100% finished right now so we might have to make small adjustments.

Here’s Simon’s video about our software and game : Software and game

We hope you will enjoy it,
See you soon !

Data acquisition – Software

Hello, i am going to talk about the program of our project. We decided to use an electrow simduino to carry out this project. It combines an Arduino uno and Sim 808 module. So with the simduino we can use the integrated development environment of arduino.

 

The program starts by importing the required libraries and the declaration of the different variables.Antoine has already presented you those libraries in the last video. Like every Arduino project, you can also find a setup part. This part allows the program to initialize the different modules we use and their communication process.

 

The next part is the loop. This part is the main part of the program and can be divided in 4 steps.The first step is about the acquisition of the position of the car. A function is used to test if the GPS connection is on. After the test, if the simduino receive a GPS signal, then this signal will be used to locate the car. Otherwise, the GPRS location will be used. It is less precise but works quite well, even inside buildings like multi-storey car park (GPS wouldn’t work in those conditions).

The second step of the program concerns the date and time acquisition. First of all, getTime() function will be used to recover the date.

 

Then, multiple functions will be used to be able to recover data from the electronics of the car. This data will contain the engine rpm and the car’s current speed.

 

The last step consists in storing all the informations acquired during the 3 other steps (location, time, rpm, speed). We use multiple means of storage. The first one is the microSD card we can find on the Arduino. Every data acquired will be stored on it.

The second one is an sms-based “storage”. It allows the Arduino to transmit the informations he is acquiring live through sms. It would be too costly to send all the data so only one sample of data will be sent upon request. That request is also a SMS sent to the Arduino.

The third mean of the storage is the more attractive but it is still in development at the moment. This mean would allow the Arduino to store Data on a SQL database through the wireless mobile telecommunications.

Team 8 – Secured & Automated Front Door #4 – Model

 

Installation of the system

For the tests of our codes and the materials we decided to stand up a front door in my garage. I’m explaining all the constructions we did to prepare this door.

We thread a wooden plank on each side of the doorjamb and then we thread these two planks in a beam. This system can easily be removed and reinstalled.

Just next to the door, a plank is attached. On this plank we can install the Arduino, the Raspberry-Pi and the different electric cables.

We drill a hole in the doorjamb to install the infrared sensor to see if the door is locked or not.

Finally we bought a lock that we are going to rotate to close or open it. When we will be sure that it works we jare just threading this lock in the doorjamb.

Future

At this moment, codes are almost ready and the test will begin soon. Stay tuned to know more about the progress of our project.

Sébastien