Midterm Project
- Angela Maure
- Mar 16, 2019
- 2 min read
My project did not end up functioning in the end, and it could be because of a number of reasons.
The result I was aiming for was meant to be a basic rolling robot that would utilize the sonar sensor to move towards me once it configured where I am.
I followed instructions in chapter 9 of Professor Hagan's book, "Make: Easy micro:bit Projects", for the wiring and as a reference for the code.
Below is a screenshot of my final code. The digital read pin blocks within the goForward function, reverseRobot function, and stopRobot function would determine which direction the kit would roll in/if the motor and wheel it is connected to would rotate clockwise or counter clockwise. The sonar code is utilized to configure where I am. The "forever" code contains a logic block to determine when to have the kit move depending on how far away I am.

In regards to the kit's failure to function, if there is something wrong within my code, I believe it could possibly be due to the lack of digital read pin blocks within other functions, such as turning left or right. I wanted to at least get it to move in the first place before I could get to coding the kit to make turns, but I didn't want to get ahead of myself.
The pictures below show the wiring on the breadboard. I made sure to continuously double-check that I had the jumpers connected in the right locations according to the instructions.




And below are the pictures of underneath the kit, where alligator clips clipped to the jumpers connected to the source voltage through the power bus and to connect the drivers to the motors. The alligator clips are wrapped as to not get tangled with the wheels.


Something might have gone wrong with how I connected the jumpers to the alligator clips and/or what side of the motor I clipped certain alligator clips. I switched them around and still there was no result.
Lastly, I have a 6 volt battery pack to power the kit with 4 AA batteries, as the 3.3V voltage regulator will balance the amount of power that goes into the entire kit.


I suspect that this is where the problem mostly lies. I fear that at some point after I had inserted the batteries into the pack, the hairs of both wires may have touched as they slipped off my fingers at one point while I stepped away for a moment to grab other supplies.
I double-checked everything to the best of my knowledge, however I know that robotics in itself is very complicated and comes with a lot of trial and error, so the problem may simply lie in that I of course am still new to it and that a lot more testing needs to be done.
Comments