Skip to content

The sensor code using an HC-SR04 and a Raspberry Pi 3 that communicates with my parking-app-api through http

Notifications You must be signed in to change notification settings

Pofay/parking-sensor

Repository files navigation

Parking Sensor:

This is the hardware component for my Capstone 2 project.

System Architecture

Using a Raspberry Pi 3 with an attached Ultrasonic Sensor (HC-SR04) it sends a PUT request to the Parking Api if the current distance of target vehicle is close or less than the set distance in an .env file.

It also shows the current distance of the target through an LCD.

Schematic

Schematic

Materials Used

Environment Settings used

LOT_ID= // corresponding parking lot id of this sensor
HOST= // host url of api
PORT= // port of api

// LCD Ports for displaying current distance of target
RS=
E=
DB4=
DB5=
DB6=
DB7=

There are two LEDs that signal whether (hypothetically) the lot is vacant or occupied.

  • Led at Pin 21 (Vacant)
  • Led at Pin 26 (Occupied)

The Device in Action

Libraries used:

About

The sensor code using an HC-SR04 and a Raspberry Pi 3 that communicates with my parking-app-api through http

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published