Bed In A Cell
Professional wrestling mark? Smark? Worker? Jobber? Um...fan?
Then this bed is for you...for perverse maneuvering.



Arduino Flush-Less (Version 1.0)
California is suffering from a debilitating drought.
When hasn't it, am I right?
Convert grass to gravel and ficus to cacti are all proposed options.
The absolute solution?
Desalinization pla--er, I mean, stop pissing away water!

Standard toilets use up to 6,500 mL (1.6 gal) of water to flush
a standard person's 400 mL of urine twice a standard day.

Hack most existing toilets with the Arduino Flush-Less
and reduce waste by up to half with out replacing a single toilet.

With just 1,825 AFL units installed, we could save 1,000,000 gallons a year, exclamation point.


Ingredients
HackADay.io/project/2206-Project-AFL

Recipe
// Arduino Flush-Less (1.0) _ TV Miller
// CapacitiveSensor Library _ Paul Badger
// PFOD _ Dr. Matthew Ford

#include <CapacitiveSensor.h>
#include <Servo.h>
#include <pfodParser.h>
#include <Stream.h>
pfodParser parser;

// Pin 6 (10M) and 5 (1K)
CapacitiveSensor deucetouch = CapacitiveSensor(6,5);
// Pin 7 (10M) and 8 (1K)
CapacitiveSensor flushtouch = CapacitiveSensor(8,7);

Servo tankservo;
Servo flushservo;

int tankOFF = 120; // Tank Servo Position OFF
int tankON = 0; // Tank Servo Position ON
int flushOFF = 180; // Flush Servo Position OFF
int flushON = 0; // Flush Servo Position ON
int bowlvalve = 10; // Bowl Pin 10
int pooLED = 9; // LED Pin 9

void setup()
{
Serial.begin(9600);
for (int i=5; i>0; i--) { // Wait
Serial.print(i);
delay(1000);
}
parserSetup();
Serial.println();
Serial1.begin(9600); // Serial1 BlueTooth (Micro)

pinMode(bowlvalve, OUTPUT);
pinMode(pooLED, OUTPUT);

tankservo.attach(3); // Tank Pin 3
flushservo.attach(4); // Flush Pin 4

digitalWrite(pooLED, HIGH); // Setup Alert
delay(1000);
digitalWrite(pooLED, LOW);
delay(1000);
digitalWrite(pooLED, HIGH);
delay(1000);
}

void loop()
{
// Turn OFF All
flushservo.write(flushOFF); // Flush CLOSED
tankservo.write(tankOFF); // Tank CLOSED
digitalWrite(bowlvalve, LOW); // Bowl CLOSED
digitalWrite(pooLED, LOW); // LED OFF

// Read Sensors
long tank_touch = deucetouch.capacitiveSensor(30);
long flush_touch = flushtouch.capacitiveSensor(30);

// Deuce, Flush or Stand By
if (tank_touch > 1500 && flush_touch < 500){ numbertwo(); }
else if (flush_touch > 1500 && tank_touch < 500){ emptybowl(); }
else ( delay(10) );

// Print Sensors (Testing)
Serial.print(tank_touch);
Serial.print("\t");
Serial.println(flush_touch);

// Write Bluetooth Menu
if (Serial1.available()) {
byte in = Serial1.read();
byte cmd = parser.parse(in);
if (cmd != 0) {
if ('.' == cmd) {
Serial1.print(F("{."));
Serial1.print(F("<gy>HackADay Prize"));
Serial1.print(F("|A~<bg o><+8>Deuce"));
Serial1.print(F("|B~<bg n><+8>Flush"));
Serial1.print(F("}"));

// Handle Bluetooth Buttons
} else if('A'==cmd) { // Deuce
numbertwo();
Serial1.print(F("{}")); // Update
} else if('B'==cmd) { // Flush
emptybowl();
Serial1.print(F("{}")); // Update
} else {
Serial1.print(F("{}"));
}
}
}

}

// Deuce
void numbertwo() {
digitalWrite(pooLED, HIGH); // LED ON
digitalWrite(bowlvalve, HIGH); // Bowl OPEN
tankservo.write(tankON); // Tank OPEN
delay(13000); /* Adjust Per Model */
return;
//Code To Lock Out NumberTwo()?
}

// Flush
void emptybowl() {
digitalWrite(pooLED, HIGH); // LED ON
flushservo.write(flushON); // Flush OPEN
digitalWrite(bowlvalve, HIGH); // Bowl OPEN
tankservo.write(tankON); // Tank OPEN
delay(6000);
flushservo.write(flushOFF); // Flush CLOSED
delay(2000);
digitalWrite(bowlvalve, LOW); // Bowl CLOSED
delay(15000); /* Adjust Per Model */
return;
}

// BlueTooth Tasks
byte cmdByte;
byte parserByteCounter;
byte parserState;
static const byte pfodMaxMsgLen = 0xff;
static const byte pfodStartMsg = (byte)'{';
static const byte pfodEndMsg = (byte)'}';
static const byte pfodWaitingForStart = 0xff;
static const byte pfodInMsg = 0;

void parserSetup() {
parserByteCounter = 0;
cmdByte = 0;
parserState = pfodWaitingForStart;
}

byte parse(byte in) {
parserByteCounter++;
if (parserState == pfodWaitingForStart) {
if (in == pfodStartMsg) {
parserSetup();
parserState = pfodInMsg;
}
parserByteCounter = 1;
return 0;
}

if ((parserByteCounter == pfodMaxMsgLen) &&
(in != pfodEndMsg)) {
parserSetup();
return 0;
}

if (in == pfodEndMsg) {
byte pfodMsgCmd = cmdByte;
parserSetup();
return pfodMsgCmd;
} else if (cmdByte == 0) {
cmdByte = in;
}
return 0;
}

Did we mention Arduino Flush-Less (Version 1.0) is BlueTooth enabled?!

Notation
Despite the plethora of HackADay logos ala our futile attempt for favoritism amidst our submission unto the HackADay Prize-contest, the Arduino Flush-Less and TV Miller are not affiliated with HackADay or their unscrupulous, dubious, down-right-under handed ways. Heathens.

Disclaimer
All claimers about HackADay are untrue, unless other wise true, to which, see?!

Articles
HackADay - Arduino Gives Your Toilet Options
Atmel - Arduino Flush Less Saves More
Embedds - Arduino Controlled Toilet Saves Gallons Per Day
Resistance Theory (Pass 0.1 Sample)
Simplified for documentation, the upper diagram is a standard model theory of a photon transit via absorption and expulsion. The lower diagram is a two-dimensional spherical wave with oscillation disturbance transit and supplementary wave pattern representation under lay. The Resistance Model demonstrates wave field resistance nodes (particles) and subsequent containment prior to demanding frequency change, suspended in a three-dimensional compression mass.


555 Timer Delay On Relay Fritzing
Having scoured the internet for a visual 555 timer delay on relay or 955 timer delay on relay schematic, most did not display a fritzing'd version which for some is much more easily translatable.

Ingredients
IC1 555 Timer (955 Timer)
B1 9 Volt Battery
C1 47uf Capacitor (Electrolytic)
C2 0.1uf Capacitor (Ceramic)
R1 470K Resistor
RL1 5 Volt Relay
S1 Toggle Switch

Recipe
The fritzing displayed below operates after a 24 second delay.
To alter the delay-on time, increase or decrease C1 and R1.
The greater resistance of R1, the slower the current to fill C1.
The greater volume of C1, the longer to fill by R1 current.
IC 3 provides a positive voltage when triggered and stays high.


Spatial Acuity Physical Relationship Research Project (158.074.1)
We are currently conducting a research project to establish a relationship between particular characteristics of the human species relative to spatial acuity. Participation in this research project will involve no more than a few moments of your time and will allow you to remain anonymous.

Spatial Acuity Physical Relationship Research Project (158.074.1)
DIY Dollar Store Arduino USB On/Off Switch
Prototyping an Arduino sketch can lead to several disconnects and reconnects of the USB cable. This unobtrusive on/off switch hack takes (3) dollar store parts to achieve what is often sold retail for vastly more. A gratuitous USB cable and/or toggle switch may already be some thing presently laying around your shop.

Ingredients
USB Car Charger
USB Cable
Toggle Switch
Paint (Optional)

Recipe
Hard connect GND, D+ and D- to the female USB and toggle the VCC. (USB Pinout)



Everybody Draw Mohammed Day - Last Year Amendment
Last year, we neglected to add our annual Everybody Draw Mohammed Day contribution and with this year's event closing in, we thought we would release our "last year" sketch prior to publishing this year's addition. Allow us, if you shall, a rendition of the meme "Dick Butt", Mohammed Butt...with retsyn.
Updated Arduino Bowel Gauge Sketch
Reference: Arduino Bowel Gauge


 // Bowel Gauge _ @TVMiller
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int ssr;
int sensorstart = 0;

void calibrate() {
lcd.setCursor(0, 0);
lcd.print("Calibrating...");
for (int x=0, x<10; x++) {
ssr = analogRead(A0);
sensorstart = sensorstart + ssr;
delay(100);
}
sensorstart = sensorstart / 10; // Average
lcd.clear();
}

void setup()
{
lcd.begin(16, 2);
lcd.clear();
calibrate();
}

void loop()
{
int sensorlive = analogRead(A0); // Live reading
int dif = (sensorlive - sensorstart); // Subtract calibrated reading
float difsol = dif * 0.191; // Variance to fl oz per 40 oz
float difoz = difsol * 1.0425; // Convert fluid to solid ounces

if (difoz < 0) {
lcd.setCursor(0, 0);
lcd.print("0.00"); // Remove negative fluctuations
} else {
lcd.setCursor(0, 0);
lcd.print(difoz); // Print OZ
}

lcd.setCursor(6, 0); lcd.print("OZ");
lcd.setCursor(11, 0); lcd.print("BOWEL");

lcd.setCursor(0, 1);
lcd.print(millis()/1000); // Print SEC

lcd.setCursor(6, 1); lcd.print("SEC");
lcd.setCursor(11, 1); lcd.print("GAUGE");

delay(100);
}

Arduino Bowel Gauge
In our current climate of caloric disseminators, few observe before and after exhumation of waste. To clarify, using a resistance sensor and an Arduino, we have hacked your bowels.

Ingredients
Arduino Uno
Aluminum or Copper Strips
1K Ohm 1/4W Resistor
100K Ohm 1/4W Resistor
0.1uf Capacitor
LCD Display [Optional]
10K Potentiometer
10 Ohm 1/4W Resistor

[Notations] The resistance sensor observed in the following multimedia is a first version testing sensor. Affixing it to a constantly drenched porcelain surface proved difficult and was temporarily remedied with Gorilla Tape.

A brass valve was added to the bowl fill line extending from the fill valve as to regulate the water level with in the bowl. Typical specs fill water to crest the rear siphon allowing waste to displace water in to the drainage line as to prevent over flow.


Sketch
[Notations] The following is a non-smoothing sketch as our current coding for a smoothing sketch is currently being modified and tested in addition to a low pass filter PWM alternative.

Resistance was measured between 60 and 100 fluid ounces and this variance was divided by the 40 fluid ounces, then multiplied by 1.0425 to obtain weight ounces.

 #include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int sensorstart = 0; // Intial reading

void setup()
{
sensorstart = analogRead(A0); // Store initial reading
lcd.begin(16, 2);
}

void loop()
{
int sensorlive = analogRead(A0); // Live reading
int dif = (sensorlive - sensorstart); // Subtract start reading
float difsol = dif * 0.191; // Variance to fluid ounces per 40 oz measure
float difoz = difsol * 1.0425; // Convert fluid to solid ounces

if (difoz < 0){
lcd.setCursor(0, 0);
lcd.print("0.00"); // Zero fluctuation
} else {
lcd.setCursor(0, 0);
lcd.print(difoz); // Print ounces
}

lcd.setCursor(6, 0);
lcd.print("oz");
lcd.setCursor(11, 0);
lcd.print("Bowel");

lcd.setCursor(0, 1);
lcd.print(millis()/1000); // Seconds
lcd.setCursor(6, 1); lcd.print("sec");
lcd.setCursor(11, 1); lcd.print("Gauge");

delay(1000); // per second
}

Update(s)
Updated Arduino Bowel Gauge Sketch (Calibration Version)

HackADay "Skull and Wrenches" logo used with(out) permission by HackADay.com

Update(s)
HackADay - We Asked For It Arduino Bowel Gauge
Instructables - Arduino Bowel Gauge
Element14 - 10 Awesome Arduino Projects
Why Not? Single Wind Shield Wiper Button Hack
Amid a light rain, masculine drivers detest the forced automation of wind shield wipers and are often resorted to having turn on, then off the wiper controls to obtain that single swipe. Here, we have hacked an Isuzu Trooper to now offer a single swipe from a single depression of a button. Control is restored.