Lab report 3 (Molly)

  1. Assembly

All the components laid out. When I was assembling, one nut wouldn’t catch on and I spent almost half an hour struggling with it with the lab assistant. At last, I figured out that it was broken by default. I ‘m impressed by my perseverance as well as my stupidity of not trying to think that there is something wrong with the nut.

2. Testing sensors

(1)Speaker (on the micro:bot)

(2)Neopixel

(3)DC motors

(4)Servo (of the kitten’s head)

3. Building a robot that can avoid obstacles using ultrasonic

(1) The robot at first could only stop in front of the obstacles. It’s because I copied the code from https://www.kittenbot.cn/products/robotic/. And missed the part of “pause for 500ms”.

(2) I added the command and adjusted it into “pause for 400ms” to allow the robot to turn left 90 degrees every time it meets an obstacle. The adjustment is made because motors’ power is different from each other. The part of the robot stops at the obstacle, shakes its head and turn the green light red is also making it more vivid. 

These are the final codes.

 

Reflections:

The robot could only turn at a certain degree. It couldn’t find its way through. Moreover, the ultrasonic only guarantees a sight at its parallel, if the obstacle is smaller or taller, it may not detect and thus run into it.

Leave a Reply