The purpose for this project was to come up with a way that made it easier to park without hitting something while pulling in or to keep you from sticking out of the back of the spot because you didn't pull forward far enough. My partner and I came up with a design to try and put in the aftermarket area for older vehicles that don't have this technology. The parking sensor is there to alert you when you are getting to close to something or it won't alert when you are not close enough.
When building this sensor we had to have an understanding on what sensors and display features we wanted to use. With the ultrasonic sensor this is a sensor that sends ultrasonic waves out and receives them back. It is able to calculate the distance away from an object by the time delay of the waves being sent and being received. We then connected this sensor to the photon 2 in order to record the distance and set the stop distance with code. The stop distance that we chose was 12 inches which is close enough but not to close when is comes to parking a vehicle. The sensor has multiple hook ups. The first being the ground, the next being the being the usb pin which gives the sensor power, the next being the D6 which triggers the ultrasonic sensor and last being the D2 which picks up the delay from the trigger pin.
When building the RGB Led light side of the circuit it was relatively simple in the fact that there were only two wires to connect. We had to code the photon on this side to pick up the stop signal given by the other photon and get the photon to send power to the light. We had the D0 on the photon connected to the red pin on the light so when the photon turned on the light it was red for stop. Then we had to also have a ground for the light which was connected to the ground pin on the photon. So when the photon communicated a stop signal the light would light up red. So this meant when you got 12 inches away or closer the light would turn red to stop.
Comments