Inspiration

We spent a few hours in the library spitballing ideas along the theme of this year's Dragonhacks, Login With Love, seeking out popular problems that we could help solve a small part of with a hardware hack. After cutting down a list of six to just two, SexI, the Sexual Insurance device, was born.

What it does

SexI is a hardware device which hopes to reduce the ambiguity of consent by providing a more permanent means for both parties to confirm their consent. To do so, both parties begin by separately pressing a button. Once pressed, a JSON string is sent to a remote server which parses the request. A block is added to the remote blockchain to represent both parties consent, and any pertinent data such as time and date is stored within the block. The server then sends a JSON string back to the device, which then parses the string and sets the device into one of three states.

Depending on the state of the device, the device will either:

1) Flash quickly to indicate consent by both parties was not acknowledged.

2) Flash slowly to indicate that a second confirmation is required to affirm consent by both parties. (Depending on user's settings)

3) Shine a steady light to indicate that consent was acknowledged.

How We built it

Software: C++, Python (attempted Blockstack)

Hardware: ESP8266, Arduino ATMega328p, Raspberry Pi

Challenges We ran into

Device-to-device communcations, implementing the blockchain

Accomplishments that We're proud of

Gettting past the communication on any big project is a huge achievement, we were very proud when the first bits of data started flowing back and forth between our Pi and the ESP8266 boards. We had a lot of fighting with small electrical "gotchas" that we were able to tease out through lots of repeated trials.

What We learned

All about low-level arduino firmware, networking configuration, UART/Serial communications, WiFi communications, and more

What's next for SexI

Get some sleep this evening and tomorrow, and hopefully graduate in the next year! June 2021 here we come (but not before the next DragonHacks!)

Share this project:

Updates

posted an update

Now we're moving! Breakfast is served and the arduinos are getting better and better, we're finally on the wireless ESP8266 chips and talking over WiFi with the Pi. Json is coming across the airwaves and things are looking up. Soon we'll be cleaning up the final pieces of backend and frontend logic and working into asthetics at the final hour or two

Log in or sign up for Devpost to join the conversation.

posted an update

Blockstack is mostly centered around javascript, but npm can't install the example project successfully on a pi 3b+ and most things are already in python/c, no need to add another language. Time to write a quick wrapper to the necessary blockstack endpoints

Log in or sign up for Devpost to join the conversation.

posted an update

The arduino and pi are now communicating well, but on the arduino end we're having trouble getting the responses to print back to the connected computer. Getting ready to switch gears and continue work on server side, leaving the interconnect for the end.

Log in or sign up for Devpost to join the conversation.

posted an update

Ben and I have started the basics, Arduino is now reading and writing button presses to serial. The raspberry pi is running a simple serial server that's getting ready to accept JSON info of the form:

{ "device_id": "device_id_here", // device id is unique for every device "consent": true, // always true, future devices may send false // if to_id is an empty string, server will pair first device that consents next // this is bad. don't leave this blank unless you have to "to_id": "second_id_here" // unique id, or empty string }

and will return some similar object to the arduino to parse. Looking forward to getting ESPs running so this json can go online. Blockchain updates to come in a few hours, for now the basics are most important!

Log in or sign up for Devpost to join the conversation.