Team 4 – Software

 

Our program follows the different sequences of a classical belote game, with 2 teams of 2 people: team 1 and team 2. Let’s see the different global steps:

  • Of course, our program is composed of different variables, a “set up” in which you find the declaration of the pin’s mode (each is an input) and a “loop” which begins with different variables that have to be initialized. Interesting things are beginning now.

 

  • Step one: after the distribution of the first five cards, we have to choose the trump. The program asks two questions via the LCD screen: who takes the trump and what’s the colour of the trump. We must answer by using the different associated buttons (one button for each team, four buttons for the colours and one button for each different card value). The program reads the state of the two buttons and comes in the condition loop which is satisfied. Each time the program has to wait that users push a button, we use a loop “do while” and a specific variable. As long as the user doesn’t push a button, the program doesn’t come into the conditional loop, the variable keeps the same value and the program comes back to the “do”. It’s the same logic for the choice of the trump. Each colour is associated to a number from one to four. The number of the trump is registered in a variable. After that, we can distribute the last three cards.

 

  • Step two: we start the game. Remember that belote game is composed of several parts of eight hands as each player has got eight cards. Game is finished when a team reaches 1000 points.

 

  • At the first hand of a part, team 1 always begins. For the following hands, the program increments itself with this part of code. After each part, the variable “start” is incremented.

 

  • As the steps of a hand are always the same for each hand, we can use a loop “for” for the eight hands of a part. During a hand, each player has to encode the colour and the value of the card that he has just played.

 

  • The encoding of the colour and the value is carried out by functions which return a number associated to the colour and the points associated to the value of the card. Finally, a third function compares the different cards to determinate which team wins the hand.

 

  • The value and the colour of the card winning the hand (I mean the stronger card) are saved in variables. The comparison function compares the colour and the value of the trump, the stronger card and the card just played. If the comparison function returns “One”, the stronger card changes. It’s the same after each played card.
  • At the end of the eight hands, the program encodes the “dix de der”, that depends on the team which has won the last hand, checks if there is a “capot” (if a team has won all the points), asks if there are some declarations (if so, the team encodes the value of the declaration) and finally checks if the takers have made their contract (which means they have to win half of the points).

 

  • The score is registered and we come back to the begin of the program until a score reaches 1000 points.

 

 

Team 10 – Building the model of the project

 

Hello everyone and welcome back in our channel.

My name is Thomas, the last member of the team who work on the beer pump equipped with a LCD screen. Today I will talk about the building of the project. For this video, I will explain how to install the whole equipment on the model. As we have already said, the troll’s pump will be equipped with a LCD screen allowing to show attractive videos for the customers.

First, we put the LCD into a case that contains also the raspberry and the controller card. This case allows to protect the element in case of splash of beer.

The next step was to wire the flow meter to the raspberry. The flow meter has 3 wires: one for the positive DC power, the second for the negative DC power and the last one to count the impulsions received (GPIO 22). This flow meter will be install between the beer barrel and the pump.

For that, we used connector pipe between the pipe and the flow meter.

Finally, the screen was fixed to the pump with a clamping clip. It was not complicated to make the building, the major part was the software, quite important.

My time is over, I thank you for listening and watching this video. The last one will be the final video with all members of the team and will present the finished project in a lively way.

See you later and stay tuned, bye.

 

Team 10 – Software part

 

Hello everyone !

And welcome to our channel.

As you know, we are creating a special beer pump equipped with a screen to promote a particular beer. So I will show you in this video how the software is working.

To remind you, the role of this prototype is to display an attractive animation when the waiter serves a beer. Another video is looped while no beer is being served. To know when the animation has to start, a flow meter returns an indication of the flow rate in real time, and when a certain threshold is exceeded, she’s started.

And now about the software, to go on the interface we have to click on the display and enter the password. Indeed the access is not allowed to everyone.

On the interface we can see some buttons, the first one is to launch the video, the two second are to specify which video he has to play. Just under these buttons, the video path is displayed.

Below we can see all about the flow meter, the actual beer flow, the total of beer served today and the total amount of beer served on this beer pump.

The last button is just to get out the program.

Regarding the program itself, he is coded in Python 3.6. To build the interface we have used the standard module “TKinter”. And to show the videos, we have worked with OMXPlayer. It is a video player specially made for raspberry pi’s GPU.

The program is very simple to understand, I won’t explain any longer, I review the code in the video and if you want more information, you can find our program on instructables.

I hope you had a nice time, please feel free to like and share our project,

And see you at the next time,

Bye

Techmonia: The software!

Hello Everyone !

In this video, we are presenting the software running in our project. There is one program for each component.

Firstly, we have the slave Arduino that receives the measures from the sensor. In order to get the values in ppm, the Arduino convert the voltage difference into ppm thanks to a big formula calculated with the calibration curve. Then, it sends the data to the master Arduino thanks to the Bluetooth module.

Secondly, there is the master Arduino that receives the information from the slave Arduino and send it to the Raspberry via the USB communication port.

Finally, the Raspberry Pi writes these measures in a “.csv” file and send an email if the concentration of ammonia is bigger than the threshold.

But before we can do that, we have to configure the raspberry. Indeed, the raspberry must know to which email address, the email must be sent. It is made in /etc/ssmtp/ssmtp.conf.

conf

Then, in the main code of the Raspberry Pi, several libraries are imported like “serial” to work with the USB communication port or “smtplib” for the email. As far as the main loop is concerned, it only has some IF conditions and a delay.

This part ends the technical presentation of our Ammonia sensor project. The next part will be a resume of everything we have done so far.

Have a nice day!

Presentation of the software – Team 1

 

Hello guys !

I’m Guillaume Van Baelen, the last member of the fish feeder project on Arduino and  the objective of this video is to present you the software of our project.

Before starting, it’s important to know that we use 2 Arduino. The first one is used to convert the sensor data into a temperature value and display it in real time on the LCD screen. The second one is employed to command the servo motor.

Actually, it’s not possible to separate the part of code of the servomotor with the temperature sensor with only one Arduino. Therefore, the data refresh rate of the temperature sensor would be synchronized with the servomotor so that means at a frequency of only one value every 12 hours, because a fish needs to be fed each 12 hours.

The software is separated into three parts. The first is about declaration of variables and includes libraries. You can see on these pictures the variable declarations used for the LCD screen and temperature sensor, for the servomotor and the LEDs:

Declaration - LCD+sensor

Declaration - servomotor

Declaration - LED

The second part is the setup. It’s a function used to initialize variables, pin modes, start using libraries, etc. You can see on these pictures the setup for the LCD screen and temperature sensor, for the servomotor and the LEDs:

Setup - LCD+sensor

Setup - servomotor

Setup - LED

The last part is the loop. After creating a setup function, the loop function does precisely what its name suggests, and loops consecutively, allowing our program to change and respond. To facilitate comprehension, each code line is followed-up by a commentary which describe what that does:

Loop - LCD+sensor

Loop - servomotor

Loop - LED

Thanks for watching this video and see you next time for the final video !

Team 2 Protoxyde: Software

 

Hey guys,

Today we are here to talk about the software of our project.

As we said in the previous video, we are working with 2 arduino, one for displaying the speed, and the other one to manage the commands.

The first program is really easy thanks to the libraries we are using

  • U8glib, is like a universal library to manage the display on screens. We have just to say with which one we are working with and the type of transmission, I2C in our case.
  • TinyGPS++ which translate the raw data from the gps

These two library makes the program really easy to use with intuitive functions.

The second one seems to be more complicated but it’s not. There are just more inputs and output. Remember we wanted to implement simple, double and long click event on buttons, so we’ve found a library « Onebutton ». This library uses interrupt and works perfectly. For example, the indicators buttons calls the « doubleclick_indicators function » when there is a DoubleClick. After that, the rest of the program is to manage the outputs according to the inputs.

Thanks guys and see you for the next video.

We are using 4 buttons, so 4 inputs, 2 « normal » push buttons for the horn and the starter, and 2 « special » one for the indicators and the lights. For these last one, we wanted to implement simple, double and long click event, so we’ve found a library « One button ». this library uses interrupt and works pefectly well.  For example, the button named indicators_button linked with the A1 input

 

The second seems to be more complicated but it’s not. We are workig with 6 functions in the loop, 3to read the inputs buttons, and 3 to write the output. Remember, we wanted to use function like simple, double and long click with some buttons so w’ve found a library « OneButton ». Easy to use we have to link the button with an analog input, and then it works with interrupt : in this example when there is a doubleclick on the indicators button, it calls the function (double_click_indicators)

About the display of the speed, the software is quite simple thanks to some well-know libraries found on the internet : u8glib and tinygpsplus

About the display of the speed, the software is quite simple. We are using only 2 functions in the loop :

  • One for getting the data from the gps
  • Another one for displaying the speed and the time on the oled display.

The software is such easy thanks to the libraries we are using :

u8glib is like a universal library to manage the display with a lot of screens. We’ve just to say with which one we are working with and which type of transmission, I2C in our case.

Tinygps++ is a beautiful function for translating the raw data from the gps into some functions really easy to use and understand as we can see here.

 

and tinygps plus for translating the raw data from the gps. As we can see, the use is really simple.

 

About the commands, the software seems to be more complicated, but it’s not.

 

EcoTeam: Materials and harware

Hello everybody,

Welcome back, I am Paul and member of the EcoTeam. Today I will introduce you, in this third, all the materials and hardware you need to carry out the construction of the EcoTrash.

Let us start with the materials to build the model. We decided to work with wood. Why wood and not other material such as metal or plastic ? Well it is quite simple, working with plastic would have been more expensive and is less easier to assemble. Metal was also excluded, because as you know from the second video, in our project we will be using an inductive sensor that will detect if the waste is metallic or not. Working with metal could disturb the sorting process. These are the reasons why we decided to work with wood.

What type of wood do you exactly need ? You will need particle board panels with a thickness of 8 or 12 mm and the panels shall have a dimension of about 1,2 m by 70 cm. 

Even though, the main material we will be using is wood, we will use a bit of plastic. We will use transparent PVC panels that will be mounted on the rubbish trays in order to wee through them and having a view on the filling level of those. 

Of course to assemble all those wooden and plastic parts you will need screws. Screws with a diameter of 3 mm and a length of 16 mm are perfect this application. 

To direct the rubbish into either, the plastic or metallic rubbish tray, the system will rotate a wooden plate with a thickness of 2 millimetres. 

The plate will rotate thanks to a hollow aluminium tube, the diameter of it, shall be around 1 cm.

Now I listed all the materials, let us talk about the hardware part. In order to automate the selection process and to have an autonomous selecting trash you need more than only wood. To automate the process you will need an Arduino, an inductive sensor, an object sensor and a servomotor. For the Arduino, the basic version, The Arduino Uno will be sufficient, and you can easily order it on the internet. We bought an Arduino kit box that includes the servomotor, the breadboard and all the cabling necessary to carry out the project. 

Important is that the sensors shall have an input and output voltage between 5 and 15 V DC.

Here you have a list with all the materials and quantities. With a budget of more or less 150 EUR you shall be able to buy all of this.

Two more videos will follow after mine, presenting the building steps of the model and the software part.

My time is over, I thank you for listening and watching this video.

See you later and stay tuned, bye.