top of page

Software presentation

The software part, which allow to the components to react together,
used a raspberry pi and a python program.

Before
everything else, you need to install raspbian or another operating system into
your raspberry PI. Warring! The numbers and place of the General Purpose Input/Output
or GPIO used to our program, can change with the different release of the raspberry
PI. We currently used a raspberry PI 2+.

What the
job of the program? Our project is programed with the python language but you can
use every another language which works on raspberry PI, the logic remains the
same. The first model of the program has a very basic logic and this is very
simple.

To make the
program, we need to know what the smart bin need to do. Le Smart Bin can does
tree thinks:

  • Open
    the cover plate when someone is placed in front of the smart bin

  • Display
    the level of waste with the LED rail

  • Send
    the Data of the level and the weight to an external server to display a graphic
    of the waste generation as a function of time.

In the
first place, the program starts the initialization of the GPIO and sets the variable.
After that, the raspberry checks the status of the infrared sensor and if the
sensor detects something, it rotates the servo motor to open the cover plate
and sets the timer value on zero and restarts the loop.

If there
are noting in the front of the infrared sensor, it checks the timer to know if
it’s the time to close the cover plate, and if there are more than 30 seconds,
it checks the level with the ultrasonic sensor, and also checks the weight with
the strain sensors and sends the data to the external server. 

After that,
the raspberry displays the level of the waste on the led rail and sets the
timer value on zero and restarts the loop.

©2019 by SmartBin. Proudly created with Wix.com

bottom of page