Inspiration
I wanted to learn how to use an Arduino Nano 33 IoT device and the Arduino cloud. This seemed like a good product that could also leverage the FordConnect API to unlock the doors and start the car.
What it does
It uses a gas sensor to determine how much alcohol someone has consumed. It has two buttons. Pressing both buttons will take a BAQ reading. Pressing the lower button will unlock the car and pressing the upper button will start the car. If you have been drinking too much then it doesn't unlock or start the car.
How we built it
I used an Arduino Nano 33 IoT device for the hardware connected with a couple of buttons and a MQ-3 gas sensor that I had. The firmware does the logic of reading the gas sensor and deciding when to set the cloud variables. The cloud variables are then updated in Arduino cloud. There is a web hook that invokes a script hosted in Google -- that hook encodes the post data and forwards it on to ngrok where it is routed to the service written in Nodejs using Express. The webhook data is evaluated and if it has cloud variables for unlocking the doors or starting the car it sends an API call to the FordConnect API.
Challenges we ran into
Drinking and coding isn't a great idea. I did some research for this project earlier in the week but I was mostly focused on the other hacks, so the majority of code was written while drinking Everclear.
Arduino cloud doesn't let your "thing" (that's what your Arduino IoT device is called) use any random webhook (it has to come from an approved list of domains) so I had to write a proxy and ran into strange encoding issues.
Accomplishments that we're proud of
I learned Arduino cloud and Google webhook & was able to throw together a demo over two days.
What we learned
It takes a surprisingly long time for alcohol to leave your body.
What's next for low BAC
Trying to get a more calibrated system.
Built With
- arduino
- arduino-cloud
- express.js
- google-webhook
- node.js
Log in or sign up for Devpost to join the conversation.