I've completed a prototype, but the following needs doing:
- Modify code and/or hardware to make the switch less sensitive. Currently using an interrupt to detect a low water level; perhaps this is better done with polling.
- Battery power. It's plugged into a power bank right now. The toilet is not close enough to a wall outlet to plug it in.
- Given the moisture in a bathroom, the Oak will need an enclosure. Clingfilm will do the trick for now.
- I have two toilets, so I need to build another one.
- Data is lost upon daily reset. Modify Losant workflow to store or export it somehow.
Here's the current code:
#define SWITCH_PIN 3
void setup () {
attachInterrupt(SWITCH_PIN, flush, FALLING);
}
void flush() {
Particle.publish("flush");
}
void loop () {}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.