Smart bottle project for IoT course
This repository contains the code and fritzing scheme for a smart bottle project I’ve made for an IoT course in college.
The prototype uses a paper cup instead of an actual bottle due to issues in distance measurement.
git clone https://github.com/OrBin/Smart_Bottle.git --recursive
npm install
pip install -r requirements.txt
A configuration file config.json
should be placed in directory src/common/
.
Here is an example of how the configuration file should look:
{
"wifi": {
"ssid": "MY_SSID",
"password": "MY_PASSWORD",
"connection_timeout_sec": 20
},
"ubidots": {
"api_token": "MY_UBIDOTS_API_TOKEN",
"device": "MY_UBIDOTS_DEVICE_NAME",
"device_id": "MY_UBIDOTS_DEVICE_ID"
},
"behavior": {
"measurements_interval_sec": 1,
"temperature_range": {
"min": 20,
"max": 30
},
"external_temperature_allowed_offset": 5,
"night_light_threshold": 40,
"required_drinking_frequency_minutes": 1
},
"bottle": {
"bottle_capacity_ml": 200,
"ml_per_cm": 36.36,
"bottle_height_cm": 10
}
}
Connect the inputs board and run:
gulp inputs
Connect the outputs board and run:
gulp outputs
This project uses some external modules for controlling components that the basic MicroPython libraries don’t include:
This project is licensed under the MIT License - see the LICENSE file for details