This is the repository Arduino code for the Hydropal smart water bottle JA company. The code will primarily allow the Arduino Pro Mini board to read the ml/sec of liquids going though the nozzle of the bottle in order to measure the millitres of water that a person drinks throughout the day. It also syncs that data to a mobile device.
Code for the water bottle itself is in the 'Hydropal' folder!
Detailed instructions can be found here: https://github.com/Hydropal/Hydropal-Arduino/wiki
- Checks sensor reading every second to find ml/sec passing through sensor
- Adds sensor reading to total ml of liquid consumed throughout the day
- Reset total counter midnight every day
- Update correct date and time over Bluetooth
- Update user preferences over Bluetooth
- Send multiple day data over Bluetooth
- Pulsing LED to remind user to sync
- Blinking LED to remind user to drink
- Proper sleep wake to control LED
- Adjusts internal data to reflect time changes and disreprencies (should work in different timezones)
- Checks if sync data is valid
- LED indicators for total volume consumed, for 5 LEDs (present in Alpha 2.0)
- Flow rate calibration
- Checks if time from device mismatches internal clock and shifts volume array backwards and forwards as necessary
- Checks if data sent from device is corrupted over transmission and should help prevent errors that require a hard reset
- Change baud rate to 38400 instead of 112000 to lower chances of data corruption during transmission
- Arduino checks for the largest value and sends it back to the device
- LED pulses when need sync
- LED blinks when need drink
- Groundwork for sleep wake times
- Groundwork for pulsing LED
- Multiple day data is sent and reset
- Data is sent to mobile device over Bluetooth
- Data from mobile device is parsed: things such as time and user preferences are updated
- Water consumed is now reset every midnight
- LEDs can indicate how much has been consumed, one for each 1 L
- LEDs in progress of being filled up blink
- Initial release
- Measures flowrate in ml/sec and adds up to total water consumed