First things first, GO READ PART 1 IF YOU HAVEN'T. You'll need everything set up from part 1 to continue to part 2.
Ok. Let's get started. First, plug the Crickit into its power pack.
Great! Then, put the "robot" micro:bit into the Crickit.
Now, take a micro-USB to USB cable and put the micro-USB side into it's slot on the micro:bit. Also put the USB side into the computer.
Now plug in your servos to the Crickit like this in the little spot that says "Servo" on it.
Tada! Now, go back to the project that you started on Microsoft MakeCode (the one with the Crickit extension in it), go up to the top of the page, and do this;
Now you have converted the blocks to python! Congratulations! It should look like this:
You can delete the code that's already there. Then copy-paste the code in this project titled "Gandalf Receiver."
Now it should look like the above. Click the "Home" button on the top left corner and then create a new project.
Now convert your new project to Python like before, except this time, copy-paste the "Gandalf Controller" code into it.
Now, you are COMPLETELY DONE with editing the code. First, link up the micro-USB to USB cable again (if you haven't already) and connect the micro-USB end to your controller micro:bit (a.k.a. not the one on the Crickit)
Then go back to your controller code and press the big purple "Download" button.
The below will pop up:
Click "Save File (to desktop)" and "OK" on whatever popup shows up. Now go to your Desktop and find your micro:bit file (it will be a.hex file). Then look for the "MICROBIT" USB drive that will also be on your Desktop and drag your.hex file into the "MICROBIT" drive.
Now your physical micro:bit should blink a yellow light a few times. Wait until it has stopped blinking and then pull the micro-USB out from it. Lay your controller micro:bit to the side and then repeat the process on the other micro:bit; this time using the receiver code.
Now press the A button on your controller micro:bit. One of the micro-servos should turn a few degrees and then go back. This micro-servo will be the left arm of your robot. Press the B button and the other micro-servo will do the same thing; this is the right arm. Then press A and B at the same time, and the head servo will do it.
Yay! The main functions of your robot are working! Now to make it look good;
Find a small box. It should by smaller than your shoulder, but big enough to make space for the Crickit. My box could hold the Crickit, but it wasn't tall enough to make room for the micro:bit, so I cut a little slot in the top so the micro:bit could poke through.
Next you will want to cut holes in the sides of the box for you to put the servos through. Glue them into place so they don't fall out.
You will have to glue the head and legs of your robot onto their corresponding servos. I used hot glue; it was a little messy (and somewhat ugly), but it worked. Try to do this after the servos are secure, just so nothing turns out too finicky.
Now test out your robot. If you press the A button on the controller micro:bit, one of the servos should turn one way. Press B and the other one will turn another way. This will look like the bot is moving it's arms. If you press both buttons the head will turn and give you a puppy stare. 🥺
Congratulations! You have just made yourself an R/C companion bot!
Uses for the bot- Show it off (you have bragging rights for making it, even if you didn't design it).
- Mod it to have sensors or voice recognition so when you do/say something, it responds.
- Give it personality in the code. In the micro:bit block code (change from the Python setting at the top of the screen to "Blocks"), there are extensions and things you can code so that, for example, when you shake it, it will respond with something.
- Give it sound. There are add-ons you can buy online that have speakers compatible to micro:bits on them. You can make your bot say something!
- Mount it on your shoulder. I was originally going to do this but I couldn't find a Go-Pro mount. Those are good for mounting companion robots on your shoulders.
If none of the servos turn
Check to make sure that the Crickit is on. There's a little switch next to the power plug, and when it's on, there will be a green light that turns on next to it.
Your servos could also be plugged in backwards, so check to make sure that the little gold parts are facing in the direction of the little green light and power plug.
If the servo turns the wrong way
The code is probably fine. Just un-attach it from the robot's chassis and flip the servo upside down. Most likely you just mounted it the wrong way.
Other Things of NoteA thing to mention: this project is pretty just the rugged outline of a R/C companion bot. If you want to add things to make it look better (i.e. faux fur or 3-D printed appendages) please feel free. I purposefully designed this so you could build on it.
If you repurpose the original design of this for something, I'm fine with it, just please give credit and ask first.
Comments
Please log in or sign up to comment.