Close

Initial Prototype

A project log for I Put My Toilet On The Internet

Logging Flushes to the Cloud

christopher-hillerChristopher Hiller 08/26/2016 at 20:060 Comments

I've completed a prototype, but the following needs doing:

  1. 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.
  2. 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.
  3. Given the moisture in a bathroom, the Oak will need an enclosure. Clingfilm will do the trick for now.
  4. I have two toilets, so I need to build another one.
  5. 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