background image

Push the clip down into the vertical slots in the Bottom Chassis Plate so it snaps in place.

Route the barrel jack cable out of the left side of the chassis and up to the moto:bit.

Plug the barrel jack cable into the barrel connector on the side of the moto:bit carrier board.

Changing the Batteries

Summary of Contents for micro:bot Kit

Page 1: ...ting started with the micro bit to the engineer looking to quickly prototype or build a proof of concept The micro bot kit v2 0 is the extension of that idea build simple robots quickly that leverage the capabilities of the micro bit while implementing peripheral sensors and motor functions with simple programming in the Microsoft MakeCode environment as a gateway into robotics What s Included in ...

Page 2: ...th these motors 2x Wheel 65mm Rubber Tire Pair Wheels to attach to the Hobby Motors 3x Jumper Wire 3 pin 6 Wires to connect the line sensors to the moto bit 2x Hobby Gearmotor Motors for driving the robots wheels 1x 4xAA Battery Holder Battery pack for powering the micro bit and the motors Note The kit does not include the following and they will need to be purchased these separately 1x micro bit ...

Page 3: ... and know how to make you dangerous and then release you into the wild to do whatever you do with your robot Be sure to share your projects with us over Twitter or Facebook We are excited to see you Start Something Suggested Reading Before continuing with this guide we recommend you be somewhat familiar with the concepts in the following tutorials Panasonic Alkaline Battery AA PRT 15201 Accelerome...

Page 4: ...s designed to add functionality to the micro bit without the hassle of a number of other boards soldering and all of those jumper wires In this case the moto bit takes a micro bit and turns it into a full blown robotics platform Wondering what you can do with it Well here are a few things Control motors through an onboard H Bridge Read digital sensors such as line and bump sensors Read analog sens...

Page 5: ...2 0 just has an upgraded micro bit connector and a Qwiic connector to bring this board into our Qwiic eco system You should be able to use the original moto bit board in the same manner as the revised board is used in the rest of this experiment guide Qwiic moto bit DEV 15713 moto bit DEV 14213 Edge Connector The moto bit connects to the micro bit via an edge pin connector This makes it handy to s...

Page 6: ...ds The good thing about this board is that if you are using Microsoft MakeCode you actually don t really need to know a whole lot about the H Bridge itself To connect the hobby motors that are included in the kit you can insert them into the 2 pin female connectors just above the motor pins The connectors are highlighted in the image below Keep in mind that direction the hobby motors will move dep...

Page 7: ... moto bit has a switch that controls the power supply to the motors That way you can have the robot powered while working on it or programming it and know that the robot is not going to start moving and drive off of the table Believe us that happens all the time Input and Output Pins ...

Page 8: ...ng a breadboard to build elaborate circuits We have a number of sensors and actuators that are built in this pin formation and will work with this board SparkFun Line Follower Array SEN 13582 Wheel Encoder Kit ROB 12629 SparkFun RedBot Sensor Mechanical Bumper SEN 11999 SparkFun RedBot Buzzer ROB 12567 ...

Page 9: ...ou can connect servo motors directly to these pins and use them right out of the box with Microsoft MakeCode I C Port We broke out the I C port of the micro bit to an external port so that you can add any I C capable sensor or actuator you can think of It is standard pin arrangement to many of our I C sensor breakout boards SparkFun RedBot Sensor Accelerometer SEN 12589 2 2 2 2 ...

Page 10: ...r so that our Qwiic line of products can be incorporated more easily Power A standard barrel jack connector is used for easily powering your robot We find that a 4xAA battery pack works great but it will accept between 3V 11V at the barrel jack That s a whole lot of robo power ...

Page 11: ...tween 3V to 11V Please do not apply more than 11V to the power jack on the moto bit The updated version of this board lists the maximum input voltage correctly Assembling Your Robot This section will cover how to assemble your robot chassis Assembly time 30 60 minutes The robot chassis requires the following pieces to build You ll find most of them in your SparkFun micro bot kit Note Several of th...

Page 12: ...4 F Encoder Mount Not Used in this Guide 2 G moto bit Mount 2 H Battery Pack Clip 1 I Line Follower Mount 1 J Line Follower Mount Plate 1 K Jumper Wire 3 pin 6 3 L Wheels 2 M Nub Caster 1 N DC Motors 2 O Line Follower Boards 3 P 4xAA Battery Holder 1 Q 4xAA Batteries Not Included 3 No Tools Necessary The robot chassis does not require any additional tools ...

Page 13: ...Orientation When we talk about the front left right and back of the Shadow Chassis we are referring to specific sides of the robot when viewed from above Notice that we consider the SparkFun moto bit to be on the back of the bot and the Bumper Whiskers and Line Follower Boards to be in the front Assembly Installing Motors Let s begin by installing the motors that will control the wheels Locate the...

Page 14: ...wist the Rear Motor Mount counter clockwise so that it snaps in place on the motor and the wires are centered in the gap of the motor mount Again be sure not to snag the wires under the motor mount Repeat the process for the second motor ensuring that it is a mirror image of the first Attach the Front Motor Mounts Slide a Front Motor Mount C onto the protruding eyelet on the front of a Motor N Ens...

Page 15: ...hassis Plate A Make sure that the rounded edges of the motor mounts and the wires are facing toward the center of the chassis Repeat for the opposite motor Attach the Wheels Slide one Wheel L onto the plastic shaft of a Motor N Look at the motor shaft Notice it has two flat edges Make sure to line up the flat edges of the motor shaft with the flat edges of the wheel ...

Page 16: ...ing array and then attach it to the chassis Locate the following Construct the Line Follower Assembly Attach the three Line Follower Boards O to the Line Follower Mount I such that the rectangular pegs in the Line Follower Mount poke through the mounting holes in the Line Follower Boards Make sure the sensors are facing away down from the clip of the mount ...

Page 17: ...ill need to connect a 3 Wire Jumper Cable K to each of the Line Follower Boards O Note the color of the wire attached to each pin Line Follower Connections Jumper Wire Color RedBot Sensor Line Follower Red GND Orange VCC Yellow OUT Attach all 3 cables to the 3 Line Follower Boards Notice that the yellow wire should be on the right out and the red wire should be on the left ground ...

Page 18: ...r assembly in from the bottom side of the chassis Route the cables through the large hole in the bottom plate The bottom of your chassis should look like the following image allowing the line sensors to be facing down Final Assembly With the motors and a few sensors attached we can assemble the main body of the robot Locate the following ...

Page 19: ...ch the Nub Caster Snap the Nub Caster M into the slot on the back of the Bottom Chassis Plate assembly Make sure the Nub Caster is on the side opposite the motors the bottom side Add the Side Struts Snap the four Side Struts E into the diagonal slots on the four corners of the Bottom Chassis Plate assembly Pull the cables through the cutouts on the chassis ...

Page 20: ... shown For the center line follower sensor route this cable through the left oval slot NOTE It might be a good idea to use some pieces of masking tape to mark which cables go to which component It s not necessary but it might help keep things organized Cable Routing Cable Connection Oval Side Left Line Follower Left Center Line Follower Left Right Line Follower Right Left Motor Wires red and black...

Page 21: ...ach side strut individually Do not attempt to use pliers or hand tools or you may end up snapping the plastic clip Attaching the moto bit In this section you will add brains of the robot the micro bit and SparkFun moto bit Locate the following You will also need the full chassis assembly which contains any additional parts you attached in previous steps Attach the moto bit Mounts Snap the two moto...

Page 22: ...otches on the moto bit Mounts G Make sure the power jack is facing the left side of the robot Push gently and evenly until it snaps into place Note The other slots in the moto bit mounts can be used to hold the Arduino Uno or the Sparkfun RedBoard Once snapped your setup should look like the image below without the wires connected to the moto bit board ...

Page 23: ...late to make sure you know what it is connected to Please Note When you have the micro bot upright and the front of the chassis facing away from you left sensors motors will be on the left side and right sensors motors will be on the right side Also the motor wires are intentionally switched for the right motor see notes below Line Followers Below is a table for each connection between moto bit an...

Page 24: ...kFun moto bit Pins Jumper Wires Center Line Follower Board P1 3 Wire Jumper Cable Yellow OUT 3 3V 3 Wire Jumper Cable Orange VCC GND 3 Wire Jumper Cable Red GND Right Line Follower SparkFun moto bit Pins Jumper Wires Right Line Follower Board P2 3 Wire Jumper Cable Yellow OUT 3 3V 3 Wire Jumper Cable Orange VCC GND 3 Wire Jumper Cable Red GND Once connected the wires should look similar to the ima...

Page 25: ...s a table for each connection between moto bit and motor Left Motor SparkFun moto bit Pins Left Motor Jumper Wires LEFT MOTOR RED Soldered on Motor Jumper Wire RED LEFT MOTOR BLACK Soldered on Motor Jumper Wire BLACK Right Motor moto bit Pins Right Motor Jumper Wires RIGHT MOTOR RED Soldered on Motor Jumper Wire BLACK RIGHT MOTOR BLACK Soldered on Motor Jumper Wire RED Once all wires are connected...

Page 26: ...p the wiring of your motors or use the adjust the code blocks to change what is forward vs reverse It s relative so either connection can be correct if the code you are using is consistent We recommend following the silkscreen to reduce the amount of time troubleshooting Correct Motor Wiring Incorrect Motor Wiring Batteries The last step is to provide a power source for the micro bot You will need...

Page 27: ...de of the Battery Holder Attach Battery Pack Insert the Battery Holder P with batteries into the back cavity of the chassis Position the Battery Holder so that the barrel jack cable comes out on the left side of the robot Insert the Battery Pack Clip H on top of the battery pack Twist and position the clip so that it rests on top of the battery pack ...

Page 28: ...he Bottom Chassis Plate so it snaps in place Route the barrel jack cable out of the left side of the chassis and up to the moto bit Plug the barrel jack cable into the barrel connector on the side of the moto bit carrier board Changing the Batteries ...

Page 29: ...le Unplug the battery pack from the moto bit Turn the micro bot over and push on the Battery Holder through the hole in the Bottom Chassis Plate This will cause the Battery Pack Clip to unsnap from the Bottom Chassis Plate Slide the Battery Pack and Clip out from the back of the micro bot ...

Page 30: ...sions One of them is that MakeCode extensions include JavaScript functions which you can use when programming in text as well as all of the blocks you need to program using the block method This makes learning and using new extensions straightforward and shortens the time to awesome when setting out to build the project of your dreams Heads up Previously these libraries were referred to as MakeCod...

Page 31: ...ow let s put your extension to good use and get your robot moving Experiment 1 Driving and Turning Introduction The Hello World for the robotics world is getting your robot moving Driving forwards backwards and steering is goal 1 when you are dealing with wheeled moving robots This experiment will cover just that getting your robot moving using our moto bit software package for Microsoft MakeCode ...

Page 32: ...gh depending on what you have Add it to your cart read through the guide and adjust the cart as necessary Hobby Gearmotor 140 RPM Pair ROB 13302 USB micro B Cable 6 Foot CAB 10215 micro bit Board DEV 14208 SparkFun moto bit DEV 14213 Wheel 65mm Rubber Tire Pair ROB 13259 Battery Holder 4xAA to Barrel Jack Connector PRT 09835 ...

Page 33: ...reates a magnetic field This then interacts with magnets in the motor causing a push pull effect If you do that in a proper spacing and timing then you can spin a shaft Shadow Chassis ROB 13301 Panasonic Alkaline Battery AA PRT 15201 Motors and Selecting the Right One Learn all about different kinds of motors and how they operate Getting Started with the micro bit The BBC micro bit is a compact po...

Page 34: ...rength torque to turn wheels In this case our gearbox also changes the axis of the shaft so that we can easily use them to drive our robot Hardware Hookup You should have already hooked up the motors during the assembly process of putting the robot together But we have a couple of things that we would like you to double check First of all make sure that your red and black wires are plugged into yo...

Page 35: ...ll the moto bit package To add the moto bit package as instructed in the Installing the moto bit Package in MakeCode section of this tutorial Note If this is your first time programming a micro bit please be sure to see our Getting Started with the micro bit tutorial on how to get your MakeCode program onto your micro bit Now you can either download the following example script below and drag and ...

Page 36: ...p select either true or false On Button Pressed The on button __ pressed code block is an event function Any code blocks that are placed inside of the block will only execute when that event happens In this block when the A button is pressed on your micro bit your robot will start moving When it gets to the end of the program it will stop again until you press the A button again Turn Motors The tu...

Page 37: ...lls the micro bit to wait for a given amount of time in milliseconds While it is waiting whatever you told before the pause will keep happening So if you want your robot to drive forward for 1 second you set the robot s motors to drive forward and then pause for 1000 milliseconds and then have the motors do something else like stop What You Should See Once your script uploads to your micro bit mak...

Page 38: ...ire wire to the silkscreen labeled as RED Then flip the wires for the RIGHT MOTOR channel with the right motor The wiring may look similar to the image shown below on the right If you flip the wires after this point make sure to set left motor invert to ____ and set right motor invert to ____ back to false for future experiments Before Flipping the Wires After Flipping Wires Go Further Now that yo...

Page 39: ... driving on It can detect lines a gradient of darkness or a blacked out area In this experiment you will program your robot to stay inside of a box that you have drawn on a surface Parts Needed You will need the following parts 1x micro bit board Not Included with Kit 1x Micro B USB Cable Not Included with Kit 1x moto bit Carrier Board 2x Wheels 1x Assembled Shadow Chassis 2x Hobby Gear Motors 1x ...

Page 40: ...EV 14213 Wheel 65mm Rubber Tire Pair ROB 13259 Battery Holder 4xAA to Barrel Jack Connector PRT 09835 SparkFun RedBot Sensor Line Follower SEN 11769 Shadow Chassis ROB 13301 Panasonic Alkaline Battery AA PRT 15201 Jumper Wire 0 1 3 pin 6 PRT 10368 ...

Page 41: ... sensor has a 3 pin header which connects directly to the moto bit carrier board via female to female jumper wires A mounting hole lets you easily connect one or more of these to the front or back of your robot chassis The IR Reflectance sensors work best when they are close to the surface below the micro bot The sensor should be about 1 8 above the table This is an optimal distance for the IR tra...

Page 42: ...ld have already hooked up the line sensors during the assembly portion of this guide You can go there now for the full assembly instructions Double check to make sure that the wires are hooked up to your line sensors correctly The line sensors hookup to your moto bit via female female jumper wires that snake through the chassis of your robot up to the moto bit The sensors hookup to the moto bit in...

Page 43: ...nt will greatly affect the P1 analog readings and thresholds for the surface value so you might have to customize these numbers to suit your application true true analog read pin P1 black_line_ i e _Baseline_Value_of_Line_Following_Se black line serial write line serial write string set black_line to set right motor invert to set left motor invert to serial redirect to USB on start Microsoft MakeC...

Page 44: ...he moto bit In this case we will be setting both motors to true to be consistent with how we assembled the robot earlier Creating a Variable In Microsoft MakeCode you need to be able to create variables to store information for your robot to compare against or to just remember You can use the built in variables under the Variables drawer as shown below But you can also make your own custom variabl...

Page 45: ... then the else section of the block is run You may be asking yourself why subtract 100 from the surface value Well that number is a sensitivity value The sensor reading fluctuates as the robot moves around and when the motors are running By subtracting 100 from the original surface variable we give the change in lighting a wiggle room or tolerance of 100 If you want your sensor to be more sensitiv...

Page 46: ... micro bit in the simulator does not reflect the LEDs on the physical micro bit in real time Heads up Each time you disconnect the micro bit from your computer you will need to re connect the micro bit by pairing it to the web browser The Show console Display button may disappear After pairing the micro bit again and using the one click Download feature the button should re appear You will notice ...

Page 47: ...Placing a small piece of brown cardboard under the sensor will cause the sensor readings to drop a certain range The surface of the cardboard was a bit higher than the surface of the table In this case it was about 82 to 85 as highlighted in green Moving the sensor over a dark black line will cause the sensor readings to jump to a certain range again In this case the values were around 943 to 983 ...

Page 48: ...e the same as when it was driving over the white table If we inspect the output when the sensor is over black electrical tape highlighted in red the readings jump around 932 to 988 This is a bit bigger than what we initially read with the white table but not as big as the brown cardboard surface Note The distance between the line following sensor and the surface matters Make sure that your surface...

Page 49: ...the value as necessary to change the sensitivity Roaming micro bot Once your code is loaded find a light surface preferably white and add a line of black electrical tape to the surface For simplicity let s make the width of the line between 1 5 inches and 2 0 inches Continue adding black electrical tape until you make a square In fact if you have a large enough space you can create a 3 foot square...

Page 50: ...re hooked up correctly in the motor ports and your motor power switch is set to RUN Motors the battery pack is plugged in and you have fresh batteries Robot Not Driving Forward If your motors are hooked up correctly and we have inverted both motors in the code try hitting the reset button on the micro bit This can happen after uploading when initially powering the micro bit up Moving in Reverse Th...

Page 51: ...s a little odd and random You want your robot to go somewhere do something and then keep going In this experiment you will elaborate what you learned from Experiment 2 to get your robot to follow a line Parts Needed You will need the following parts 1x micro bit board Not Included with Kit 1x Micro B USB cable Not Included with Kit 1x moto bit Carrier Board 2x Wheels 1x Assembled Shadow Chassis 2x...

Page 52: ...EV 14213 Wheel 65mm Rubber Tire Pair ROB 13259 Battery Holder 4xAA to Barrel Jack Connector PRT 09835 SparkFun RedBot Sensor Line Follower SEN 11769 Shadow Chassis ROB 13301 Panasonic Alkaline Battery AA PRT 15201 Jumper Wire 0 1 3 pin 6 PRT 10368 ...

Page 53: ... line it means that you are veering to one side or another and your robot should correct itself We will use the information from multiple sensors combined with an if else statement block to build a decision tree for your robot to follow For simplicity we will start with using just two of the line sensors the left and right sensors to follow a dark black line As you add more line following sensors ...

Page 54: ...ring the assembly portion of this guide You can go there now for the full assembly instructions Double check to make sure that the wires are hooked up to your line sensors correctly The line sensors hookup to your moto bit via female female jumper wires that snake through the chassis of your robot up to the moto bit The sensors hookup to the moto bit in the following order LEFT PO CENTER P1 RIGHT ...

Page 55: ...her download the following example script below and drag and drop it onto your micro bit or use it as an example and build it from scratch in MakeCode Calibration is very important with the line sensors to work accurately Your environment will greatly affect the P0 and P2 analog readings and thresholds for the surface values so you might have to customize these numbers to suit your application tru...

Page 56: ...e we are using button A again to recalibrate the line following sensors whenever we need we ll be using button B to start the program This is so you can get a good base reading to calibrate your sensors without having to wrestle with a robot that is trying to move around To remind us to press button B the on start block displays a short animation once to point at button B If the motor switch is fl...

Page 57: ...rward Case 2 If the left sensor sees a dark black line but the other does not move forward and a little to the left toward the dark black line closer to the left side of the micro bot Case 3 If the right sensor sees a dark black line but the other does not move forward and a little to the right toward the dark black line closer to the right side of the micro bot There are slight differences in the...

Page 58: ...nsole without having to drag and drop the file to the micro bit after updating the firmware For more information about using the WebUSB feature on MakeCode make sure to check out the instructions provided by micro bit support DISPLAYING REAL TIME SERIAL DATA IN THE MAKECODE CONSOLE Otherwise you can use your favorite serial terminal or program to real time serial data plotter to graph the output W...

Page 59: ...rs Moving the micro bot over a piece of brown cardboard and black electrical tape you will notice that the sensor readings move at the same time when the graph zooms out White Table under P0 and P2 Brown Cardboard under P0 and P2 Black El For this reading we moved the micro bot further into the cardboard so that the distance between the line following sensors and cardboard box were the same Let s ...

Page 60: ...s we turn on the motors for the micro bot and view the data the output will become noisy instead of being a steady output You ll also see the output become slightly bigger when ever the motors are turned on whenever it tries to follow a dark black line The image below highlights the area when both sensors see a dark black line When this happens the micro bot will drive forward The image below show...

Page 61: ...ou have it centered with the line just underneath the center line sensor Make sure the motor switch is changed from STOP MOTORS to RUN MOTORS and press the B button to start Stop Motors Run Motors Your robot should drive forward until one of the side line sensors detects the dark black line and then it will turn in that direction to correct itself Depending on your line shape and thickness your ro...

Page 62: ...cript below and drag and drop it onto your micro bit or use it as an example and build it from scratch in MakeCode Calibration is very important with the line sensors to work accurately Your environment will greatly affect the P0 and P2 analog readings and thresholds for the surface values so you might have to customize these numbers to suit your application micro bot kit Exp3 micro bot kit Exp3 E...

Page 63: ... a closer view Modified If Condition Statement true true analog read pin P0 analog read pin P2 set black Line R to set black_Line_L to turn motors OFF set right motor invert to set left motor invert to serial redirect to USB on start Microsoft MakeCode Terms of Use Privacy Download ...

Page 64: ...r of the motor so that we do not get stuck in the same spot After the 3rd time we will try looking to the right before starting all over again We will only want to use the move_left variable in case 4 We ll reset the variable whenever we go into the other cases What You Should See The serial output will be the same if you open the MakeCode console If you need you can open it back up to view the ou...

Page 65: ...rface for line following problems Here are some more challenges to explore and experiment Try adding more code to utilize the center line following sensor Instead of having the robot follow a counter clockwise motion try have the robot move in a clockwise motion Adjust the code to follow a dark black line for a complex maze Adjust the motor speed and remove the LED array to see how fast your line ...

Page 66: ...cro bot starts up Make sure to have the sensors over a black line Experiment 4 Using the Accelerometer Introduction Now what happens when something bumps into your robot It just stays there and take it from this bully No It should move out of the way or do something In this experiment you will use the accelerometer on the micro bit to trigger the robot to move out of the way If you flip the robot ...

Page 67: ...ing micro bit Board DEV 14208 SparkFun moto bit DEV 14213 Wheel 65mm Rubber Tire Pair ROB 13259 Battery Holder 4xAA to Barrel Jack Connector PRT 09835 Shadow Chassis ROB 13301 Panasonic Alkaline Battery AA PRT 15201 ...

Page 68: ...information about the motion sensor hardware change check out this article from micro bit support MICRO BIT SUPPORT MOTION SENSOR HARDWARE CHANGE What is Electricity We can see electricity in action on our computers lighting our houses as lightning strikes in thunderstorms but what is it This is not an easy question but this tutorial will shed some light on it Accelerometer Basics A quick introduc...

Page 69: ...for Hardware Hookup You have had the hardware hooked up the whole time It is on the micro bit Feel free to move on Running Your Script Be sure to add the moto bit package as instructed in the Installing the moto bit Package in MakeCode section of this tutorial Now you can either download the following example script below and drag and drop it onto your micro bit or use it as an example and build i...

Page 70: ... will only be ON in the screen up orientation If you tap the robot hard enough it will run drive away from you If you flip it over the motors will turn off Same thing holds true if you place it on its tail with the micro bit pointing up Try playing around with the different events that you can trigger with the accelerometer Can you get it to detect bumping into an object like the wall and have it ...

Page 71: ...ing in the wrong direction As explained above you can flip the wiring of your motors or use the set ____ motor invert to ____ block in your on start block to change what is forward vs reverse Experiment 5 Controlling a Servo Battle Bot Introduction Your robot should do something more than just drive around Maybe control a small robotic arm a gripper or even a weapon of some kind In this experiment...

Page 72: ... Servos Didn t get the kit Have no fear Here are the parts you will need to complete this experiment Servo Generic Sub Micro Size ROB 09065 Hobby Gearmotor 140 RPM Pair ROB 13302 micro bit Board DEV 14208 SparkFun moto bit DEV 14213 Wheel 65mm Rubber Tire Pair ROB 13259 Battery Holder 4xAA to Barrel Jack Connector PRT 09835 ...

Page 73: ...ollower SEN 11769 Shadow Chassis ROB 13301 Panasonic Alkaline Battery AA PRT 15201 Jumper Wire 0 1 3 pin 6 PRT 10368 Hobby Servo Tutorial Servos are motors that allow you to accurately control the rotation of the output shaft opening up all kinds of possibilities for robotics and other projects Getting Started with the micro bit The BBC micro bit is a compact powerful programming tool that require...

Page 74: ... to a motor that drives the shaft There is also a potentiometer that gives feedback on the rotational position of the servo which is then compared to the incoming PWM signal The servo adjusts accordingly to match the two signals Hardware Hookup In this experiment you will actually be using two different servo motors to create a Battle Bot One will be used as a left jousting lance and the other as ...

Page 75: ...n be cut down to the needed size You can either glue or tape each skewer to the servo to the supplied attachments Each servo set comes with a small bag of attachments as seen below In this experiment we utilized the double arm micro horn but any of them will work Don t have any skewers laying around Be creative here Bot Assembled with Servos This Battle Bot utilized electrical tape to mount the jo...

Page 76: ...me glue If you need check with an adult for assistance Not as terrifying but safe Running Your Script Be sure to add the moto bit package as instructed in the Installing the moto bit Package in MakeCode section of this tutorial Now you can either download the following example script below and drag and drop it onto your micro bit or use it as an example and build it from scratch in MakeCode This s...

Page 77: ...e Pin to block is found under the Pins drawer and it accepts a pin number that you have a servos signal wire attached to as well as an angle that you want it to rotate to That s the basics for controlling a servo motor with Microsoft MakeCode true true set right motor invert to set left motor invert to turn motors OFF on start Microsoft MakeCode Terms of Use Privacy Download Edit Simulator Blocks ...

Page 78: ... 12 wide x 6 long using black electrical tape This is where your robot will meet with an opposing robot When the code initializes the servo arms will move into a starting position and take initial readings for your line sensors to establish a comparison point to the ground environment Make sure to calibrate it with a black line before starting Then place each robot at an equal distance away from t...

Page 79: ...correctly in the motor ports and your motor power switch is set to RUN Motors the battery pack is plugged in and you have fresh batteries Moving in Reverse There are two options if you notice the micro bot moving in the wrong direction As explained above you can flip the wiring of your motors or use the set ____ motor invert to ____ block in your on start block to change what is forward vs reverse...

Page 80: ... will utilize the MakeCode radio blocks to have the one micro bit transmit a signal to a receiving micro bit on the same channel Eventually we will control a micro bot wirelessly using parts from the arcade kit Gator starter ProtoSnap Hookup Guide Get started clipping sensors and lights to the micro bit with the gator starter gator board from SparkFun Gator color ProtoSnap Hookup Guide Clip some L...

Page 81: ...utonomous Vehicle The Batmobile Documenting a six month project to race autonomous Power Wheels at the SparkFun Autonomous Vehicle Competition AVC in 2016 Wireless Remote Control with micro bit In this tutorial we will utilize the MakeCode radio blocks to have the one micro bit transmit a signal to a receiving micro bit on the same channel Eventually we will control a micro bot wirelessly using pa...

Reviews: