This week, I started testing the ultrasonic sensor and the servo motors with the Arduino code that I wrote. For the ultrasonic sensor, the code works as expected and the sensor is pretty accurate in determining the distance of a nearby object. For now, I have it so that it measures the distance every second. I held it from some distance above a flat surface, and tested with placing some objects above it. However, when I tested with some small, thin objects, there were times when the distance increased instead of decreasing. This might be due to the ultrasonic sensor not being fixed in place or because I’m measuring too often, so I will adjust this more when we start building our mechanical part. Also, the weight sensor will be better at sensing these thin objects once it’s incorporated. Here is the current output of the ultrasonic sensor in the serial monitor:
For the servo motor, I wrote a simple code that turns 90 degrees to the left/right every few seconds. The motor works as expected, so I can incorporate this functionality which will turn to a certain direction based on the output that the Jetson gives after the CV classification.
I am currently on schedule, but I have not received the weight sensor yet. Since the weight sensor was a recent change in our design, I might need a bit more time to finish the hardware implementation. But since the weight sensor is just an additional check in our object detection system, it should not take too much time. Next week, I hope to focus more on working with Jetson for the serial communication with Arduino and the camera capturing functionality with our Arducam. I also hope to conduct more thorough testing of the ultrasonic sensor and the servo motors, with different materials that can possibly placed on our platform.