Inspiration

As students, we spend a majority of our day in lectures, help rooms, or hanging with our friends leaving our dorms empty. Due to the density of dorms sometimes there aren't even cameras protecting our valuables. To help the community of people who face this same problem, we were inspired to create 'No Sweat' which gives its users live updates on the noise or temperature level of their rooms to protect against fires or burglary.

What it does

We programmed the OLED display to display simple statistics, like temperature, humidity, and noise level. The display can be cycled through by pressing a button on the board. Furthermore, it prints temperature and noise level to a serial port. If the temperature is abnormally high or low, it will send the user a text message notifying them, through Twilio. The user can also text simple commands like "sound" to receive current measurements.

How we built it

We started with the Arduino docs on the board, so the first feature implemented was the OLED display. This can be done relatively easily with the built-in libraries:

#include "DHT.h"

#define DHTPIN 3
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE); // setup
float temp = dht.readTemperature();
Serial.println(temp);

The code snippet above uses the DHT reader to measure the current temperature, in Celsius, as a float. It then prints to the serial port.

We then listen on that port in a python script:

arduinoData = serial.Serial('COM7', 9600)
while True:
  if arduinoData.inWaiting() > 0:
    block = arduinoData.readline().decode("utf-8")

This data is processed through a data serializer. Finally, we used the Twilio API and Ngrok to send and receive messages to trigger different functions in the Python script.

Challenges we ran into

The biggest challenge was that we only had one Arduino board so only one person could effectively test their code at a time. This was pretty inconvenient and we had to frequently swap laptops. The port numbers were also different on each computer. Overall, workflow was our greatest challenge.

Accomplishments that we're proud of

This was the first hackathon for all of us, so we're proud to have created a somewhat coherent project without any ideas going in. For the most part, it works as intended.

What we learned

We learned a lot about reading, processing and sending data to a server. This is important because we want users to be able to communicate with the device from their phones.

What's next for our project

A feature that we wanted to add but didn't have the time for was a much better user experience. Right now, most of our intended functionality was implemented, but it's difficult to use without reading documentation. A userauth system and better ux are next.

Built With

Share this project:

Updates