Ultrasonic Sensor + LCD Screen

For this assignment, I combined an ultrasonic sensor and LCD screen to create a real-time physical display. I initially wanted to use the joystick and servo as well to create a controllable rotating platform, however, I realized it would require materials that I did not have. Thus, I had to abandon the idea and simplify my approach. As such, I decided to only use the ultrasonic sensor and LCD screen because I thought both of them were interesting and could be combined to create something practical. The most difficult part was figuring out how to use the LCD screen. Although I was successful in getting it to display the measurements from the ultrasonic sensor and update it in real time, I was ultimately unable to get the LCD screen to display two different lines of text (I wanted to include a message on the line underneath the measurement that changed depending on how big the distance was). I browsed various forums trying to find a solution and they all said to use the setCursor() function, which I had already tried and was unsuccessful with. As such, I was a little disappointed that I couldn’t get that part to work. From working with the microcontroller, I learned that it’s really important to check over your wiring and connections numerous times in order to ensure that everything is wired correctly so that nothing breaks or explodes ( I spent a long time doing this). In the future, I could potentially use the digital humidity and temperature sensor with the LCD screen to measure the outside temperature more accurately. I would have to find longer wires and a way to get the wires through my window without leaving an opening for warm air to escape.

My circuit in Tinkercad for reproducibility.
I used the following for help: