We were inspired to solve a problem with automotive transportation by the Eastbanc: Best Vehicle Optimization Hack category, which seemed like an interesting challenge. We wanted to help people feel more comfortable as their lives begin to transition slightly away from quarantine and towards what was once normal. One thing that stuck out as particularly different would be waiting, especially for parking. We thought that by making parking easier in large lots such as those at Costcos and large colleges, people would better welcome and increase in transportation.

What it does

Parkalot is a website that allows users to view whether or not a parking space is currently in use, as well as the space's location relative to the lot. Users can visit the webpage either from home or as they enter the lot in order to see where there are open spots.

How we built it

We split the development of Parkalot into three distinct sections: frontend, backend, and hardware. The loop starts with the hardware, an Adafruit feather HUZZAH ESP8266, which controls an HC-SR04 Ultrasonic Sensor. This package is placed in between two parking spaces so it can see when cars are occupying them. When the ultrasonic sensor detects the presence of a car parked, it sends an HTTP POST request to the serverless backend. The request contains information about the time the car entered the spot and which spot it was. The backend stores this information in a database, and then alerts the frontend that the status of the space has changed. Upon receiving this alert, the ReactJS frontend rerenders an SVG which displays each of the parking spaces and their statuses.

Challenges we ran into

  • Setting up a dev environment for embedded C++
  • Creating a serverless API
  • Making a React hook called inside a setInterval()

Accomplishments that we're proud of

  • Setting up proper hosting with HTTPS was a beast
  • Interfacing the ultrasonic sensor with the WiFi chip
  • Learning about websockets
  • Working with SVGs in React

What we learned

  • DNS and HTTP/S requests
  • Websockets
  • JSON is a pain in C++ :)

What's next for Parkalot

  • instead of generating an SVG map, if each of the sensors had a way to know its GPS coordinates, we could overlay it onto a real map, such as with leaflet or google maps.
    • The open parking spaces could be included in waze and google maps navigation
    • Using google street view, the open parking spaces can be overlaid over an actual image of the parking lot, which is easier to navigate than any digital representation.
  • We could create a system to help avoid parking conflicts. On the website, a user could mark which spot they're aiming to park in. This would be visible to all of the other users, and could help avoid the frustration of getting to a spot right after it's taken.
  • We could CAD a frame to hold it and help keep the sensor weather-proof
Share this project: