As a girl who does exercise a lot but favors sugars in daily life, disciplining myself to keep fit sometimes is complicated work.
I understand that the key is to control my daily consumption of snacks that contain sugar. How am I supposed to do that? Here comes the SBox idea - It will help me to calculate and control the quantity of snacks that I will have each day.
What does SBox do?SBox is a box, and my favorite snacks are stored inside this box. Its rules are set to - 3 times a day - that I can take snacks out of the SBox.
There is a terminal(wio terminal) with a screen outside of the box. At the beginning of the day, it will tell me that there will be 3 times that I can take snacks from it.
Each time I take snacks, the information will change and tell me the remaining chances left for the day.
When all 3 chances are used up and I reach for it another time, SBox will remind me and display a girl that is surely not the type that I want to be, while a buzzing sound is produced at the same time.
Check below video how it works.
Steps making the SBoxConnectionsIt's very easy, only 3 components are needed -
1 x Wio terminal
1 x Wio terminal chasis battery
1 x Grove sensor
Wio terminal and its battery connection.
Connect the grove sensor to the "D0" port of the wio terminal. D0 located on the right side of the front panel, right under the blue button. (Click here to visit the wiki page of the wio terminal to learn more if you wish)
This is how my wirings look like.
Wio terminal is compatible with Arduino and you can use Arduino IDE to program it. There will be some libraries and drivers needed in order to make that work. The Seeed wiki page has explained it in very detail. Check here.
Prepare SD card imageWio terminal processes images formatted with ".bmp". The workflow is to
- Prepare a desired image
- Convert it to binary ".bmp" file with dimension fit to wio terminal screen(230x235 in pixels)
- Put the file to SD card's root directory
Instructions for the above 3 steps can be found from Loading Image in Seeed wiki. Note the size of the image should be set around 230x235 pixels to fit wio terminal's screen.
Arduino Libraries for SBox projectWe need the following libraries
- Grove ultrasonic sensor
Step 1. Download the UltrasonicRanger Library from Github.
Step 2. Refer How to install library to install library for Arduino. - RawImage.h - for SD card image
Download it and put it in the same directory as your Arduino SBox project locates - "Seeed_FS.h" - can be downloaded from Arduino IDE
- "TFT_eSPI.h" - can be downloaded from Arduino IDE
Check the "code" section on this project.
Box assemly- Wio terminal outside of the box
- Grove ultrasonic range inside the box
And SBox is ready to go!
Comments
Please log in or sign up to comment.