Assignment 3

For this third assignment, I tried to utilize a potentiometer, ultrasonic sensor, and button switch as inputs to turn on an LED. At first, I was trying to use these inputs turn a servo, however the servo was not rotating to the full degree that I had intended, so I switched it to an LED to debug the code. I found that in trying to combine these sensors, the ultrasonic sensor gave me the most issue. I had no issues in getting values from the potentiometer and the button, but the ultrasonic sensor was not working as well as I had hoped. Secondly I ran into a little issue in trying to get the IDE to read the sensors in the order I wanted it to. It could be that I had the “serial.println” code written incorrectly, so it was showing up in the console incorrectly, but I think I mostly missed a piece of code that told the Arduino to read the sensors in a particular order. All in all, I failed in trying to turn the LED from a sequential sensor input.

Leave a reply

Skip to toolbar