- Jar with a non-conductive body and a conductive lid
- 5 Kg Load Cell - Used in the scale to measure load
- SparkFun Load Cell Amplifier - Amplifies the load cell signal and communicates with the Pi
- 2 Wooden Plates for the Scale - Connect with the load cell to produce a scale
- 2 5V 50N Hold Strength Magnets - Holds the jar lid in contact with the jar when powered
- 5V Power Adaptor - Powers the magnets through the relay
- Relay - Controlled by Pi to connect 5V supply to the magnets
- Raspberry Pi
- Aluminum Foil and Wire Contact sensors for the Lid on Jar and Jar on Scale
- Alarm/LED - Activated by Pi when the lid is forcibly opened or the child took more than the approved quantity.
- Jar - link
- Alamscn 5 Kg Load Cell - link
- SparkFun HX711 Load Cell Amplifier - link
- 50N 5V Magnet - link
- 5V Power DC Power Adaptor - link
- KeeYees Relay - link
-
Create an account in IBM Watson IoT platform and register your device (ibmcloudpi).
-
Generate api_token for bot.
- Download and install the Telegram mobile application or desktop application for your system from the following site: https://desktop.telegram.org/
- Once you login to your Telegram account, search for "BotFather" in Telegram. Click on "Start" --> enter the following command:
/newbot
- Follow the instructions on screen and choose a name for your bot. Post this, select a username for your bot that ends with "bot" (as per the instructions on your Telegram screen)
- BotFather will now confirm the creation of your bot and provide a TOKEN to access the HTTP API - copy this token.
-
Update the
api_token
inproperties.json
-
Update Device info in
properties.json
-
Add
orgId
,typeId
,deviceId
andtoken
indevice.yaml
-
Add
appId
,key
andtoken
inapplication.yaml
-
Run
bash setup.sh
or./setup.sh
to install prerequisites. -
For Windows, follow this link to install wkhtmltopdf.
-
Run
bash startBot.sh
or./startBot.sh
from root directory to start the bot.
- Update Device info in
properties.json
- Add
orgId
,typeId
,deviceId
andtoken
indevice.yaml
- Run
bash setup.sh
or./setup.sh
to install prerequisites. - For Windows, follow this link to install wkhtmltopdf.
- Run
bash startJar.sh
or./startJar.sh
from root directory to start the jar.