Understand that this was a project developed for MIT StupidHack. A hackathon dedicated to developing stupid projects. Also understand that the toilet paper that MIT uses is half a ply, so this is in partly in protest.
Intro:
Let me introduce you to Sheetwise (pronounced shĭtwaɪz). We need to talk about defecation. For too long, our flat mates, colleagues, friends and family have been able to use toilet paper unrestricted, uninterrupted and - importantly - uncharged. This brings about a race to the bottom, a race to the cheapest toilet paper. Today, we democratise access to toilet paper by charging users by the sheet.
Now, for your coddled butts out there – not like the half-ply MIT use - you will be able to purchase the purchase the best toilet paper you want, you deserve it. This is because as you, or your flatmates, through Bluetooth promixity sensors on your phone , approach the Sheetwise device, you will be identified before you evacuate your bowls.
At the wiping phase, we record per sheet extracted from the roll through laser spectroscopy and through associated velocity and frequency measures we can extract the integer number of wipes as well as total toilet paper usage (in metres). The number of sheets is then passed onto the Splitwise API which charges the user accordingly, either in dollar or bitcoin. The use of a sheet will send a push notification to your phone, apple watch and friends - so now you can find out who is using all the good toilet paper, indeed, you might mind less - since they are paying for it!
Finally, faecal regulation is a really important physiological measurement. Specifically, the number of wipes, is a function of the viscosity of the excrement – which is one of the clearest indicators of bodily health. Apple Health is yet to provide an API for wipe rate, but we stand ready to interface with Apple Health.
Photos:
Demo:
We’d now like to demonstrate our solution.
Main (Bluetooth Detection etc)
import time
from dataclasses import dataclass
import bluetooth
from mouse import RollMonitor
"""
What this should do:
be waiting for a bluetooth connection
after bluetooth connection starts, initiate measurement module
Occasionally update how much TP has been used for display
After bluetooth connection ends, do end activities
"""
@dataclass
class ToiletRoll:
name: str
sheets: int
roll_price_USD: float
def get_cost(self, sheets_used) -> float:
return self.roll_price_USD/self.sheets * sheets_used
class ble_module:
def __init__(self):
self.whitelist = ["OnePlus 7Pro", "SPIFF"]
return
def get_nearest(self) -> str:
nearby_devices = bluetooth.discover_devices(lookup_names=True)
print("Found {} devices.".format(len(nearby_devices)))
devices = [(name, addr) for (addr, name) in nearby_devices if name in self.whitelist]
return devices[0] if len(devices) else ("", "")
def is_still_nearby(self, addr) -> bool:
return addr in bluetooth.discover_devices()
class ShitWise:
def __init__(self, toilet_roll_data:ToiletRoll):
self.ble = ble_module()
self.monitor = RollMonitor()
self.toilet_roll_data = toilet_roll_data
def run(self):
# Wait for BLE connection to device
connected_device_name = ""
connected_device_addr = ""
while connected_device_name == "":
print("Scanning for whitelisted devices")
connected_device_name, connected_device_addr = self.ble.get_nearest()
print("Connected to {} {}".format(connected_device_name, connected_device_addr))
# start rollmonitor
self.monitor.reset()
self.monitor.start()
# Wait for BLE to disconnect
while self.ble.is_still_nearby(connected_device_addr):
print("still connected")
# Disconnected, do final sheet accounting
print("{} disconnected! Session finished".format(connected_device_name))
self.monitor.stop()
sheets_used = self.monitor.get_sheets()
print("sheets used: {:.2f} \t price: {:10.2f}".format(sheets_used, self.toilet_roll_data.get_cost(sheets_used)))
# Splitwise
if __name__ == "__main__":
toilet_roll_data = ToiletRoll(name = "Charmin ultrasoft", sheets = 240, roll_price_USD = 8.49/6)
sw = ShitWise(toilet_roll_data)
sw.run()