background image

 

SparkFun micro:bit Breakout (with Headers)

 

B O B - 1 3 9 8 9

 

 

Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

 

P R T - 1 1 0 2 6

 

     

2 0

 

Introducing the Accelerometer

 

The accelerometer is a component that you won’t find in the kit’s bag of parts. Why? Because it is on 
the micro:bit itself! On the back of the micro:bit you can see a number of small chips. One of them is 
the accelerometer. 

 

An accelerometer is a sensor that measures the gravitational forces pulling on it in all three 
dimensions of the chip’s X, Y and Z axes. 

Summary of Contents for Inventor's Kit

Page 1: ...will need to explore the 12 circuits of the SparkFun Inventors Kit for micro bit At the center of this guide is one core philosophy that anyone can and should experiment with cutting edge electronics...

Page 2: ...Small Servo Here is a simple low cost high quality servo for all your mechatronic needs Piezo Buzzer BUZZZZ Used to make different frequencies of sound USB micro B Cable This 6 foot cable provides you...

Page 3: ...in the kit You may not need everything though depending on what you have Add it to your cart read through the guide and adjust the cart as necessary SPARKFUN INVENTOR S KIT FOR MICRO BIT WISHLIST Sug...

Page 4: ...evelopment board that works in sync with onboard hardware components to get you started down the path of programming hardware At half the size of a credit card each board is equipped with a surprising...

Page 5: ...to draw on and display words numbers and other information 2 A B Buttons Two buttons in all of their clicky glory A is on the left B is on the right and both are prime for controlling a game of your...

Page 6: ...7 JST Battery Connector A connector to hook up an external battery pack to your micro bit Hooking It Up The micro bit uses a microUSB cable to hook up to your computer or Chromebook It is as simple as...

Page 7: ...ode MakeCode is an open programming environment built by Microsoft for the micro bit as well as other boards You can navigate to MakeCode for the micro bit by clicking on the button below LAUNCH MAKEC...

Page 8: ...ng blocks which are color coded by function 9 Simulator Hide Show You can hide show the simulator if you would like 10 Simulator You don t need hardware MakeCode has a real time simulator As you chang...

Page 9: ...er If you just want the complete program you can see it here To see a step by step explanation of how we built the program continue reading Note You may need to disable your ad pop up blocker to inter...

Page 10: ...it inside of your forever block Notice that the block is keyed to fit inside of the foreverblock and if you have the volume up on your computer you will hear a satisfying click noise when you let go o...

Page 11: ...We need to slow this down To slow your animation down you will use the pause block which is under the basic block set The pause block is just what it says it tells the micro bit to pause and wait for...

Page 12: ...ocation you have set in your download preference You then simply click and drag your program file from its download location to your micro bit drive which shows up as an external device That s it Your...

Page 13: ...micro bit Breakout with Headers 1x Breadboard 1x Jumper Wire 1x LED 1x 100 Resistor Didn t Get the SIK for micro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest...

Page 14: ...SparkFun micro bit Breakout with Headers BOB 13989 Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 LED Basic Red 5mm COM 09590 Resistor 100 Ohm 1 4 Watt PTH 20 pack Thick Leads PRT 14493...

Page 15: ...breakout This breakout board makes it much easier to use all of the pins available on the micro bit edge connector in a more user friendly way We also broke out ground and VCC 3 3 volts for your conve...

Page 16: ...current can lead to a burnt out LED To restrict the amount of current that passes through the LED we use a resistor in line with the power source and the LED s long leg this is called a current limiti...

Page 17: ...mponents like resistors need to have their legs bent into 90 angles in order to correctly fit the breadboard sockets You can also cut the legs shorter to make them easier to work with on the breadboar...

Page 18: ...e the following code into your own MakeCode editor by clicking the open icon in the upper right hand corner of the editor You can also just download this example by clicking the download button in the...

Page 19: ...tate You use 1 as on and 0 as off If you prefer you can also use Boolean states of true and false but we will use 0 and 1 as our standard throughout this guide Pause If you were to just turn pins on a...

Page 20: ...on as we can techsupport sparkfun com Experiment 2 Reading a Potentiometer Introduction In this circuit you will work with a potentiometer You will learn how to use a potentiometer to control the brig...

Page 21: ...00 Resistor Didn t Get the SIK for micro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest using these parts Breadboard Full Size Bare PRT 12615 18 micro bit Board...

Page 22: ...Trimpot 10K with Knob COM 09806 6 Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 LED Basic Red 5mm COM 09590...

Page 23: ...microcontroller i e micro bit To hook up the potentiometer attach the two outside pins to a supply voltage 3 3V in this circuit and ground It doesn t matter which is connected where as long as one is...

Page 24: ...be connected to a circuit in one direction Wiring Diagram for the Experiment Having a hard time seeing the circuit Click on the wiring diagram for a closer look Note The full sized breadboard power r...

Page 25: ...the variables that exist in your program and then add a value that you want to store or set that variables to Analog Read In this program you are reading the voltage from the potentiometer which is 0...

Page 26: ...pin LED Not Lighting Up LEDs will only work in one direction Double check your connections Experiment 3 Reading a Photoresistor Introduction In Experiment 2 you got to use a potentiometer which varie...

Page 27: ...t with Headers 1x Breadboard 8x Jumper Wires 1x Photoresistor 1x 10k Resistor 1x LED 1x 100 Resistor Didn t Get the SIK for micro bit If you are conducting this experiment and didn t get the Inventor...

Page 28: ...Mini Photocell SEN 09088 7 SparkFun micro bit Breakout with Headers BOB 13989 Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 LED Basic Red 5mm COM 09590...

Page 29: ...1 4 Watt PTH 20 pack Thick Leads PRT 14491 Resistor 100 Ohm 1 4 Watt PTH 20 pack Thick Leads PRT 14493 Introducing the Photoresistor The photoresistor changes its resistance based on the light to whi...

Page 30: ...o bit you will need to build a voltage divider like the one in this experiment To learn more about resistors in general check out our tutorial on resistors and also our tutorial on voltage dividers No...

Page 31: ...single time calibrationVal is a calibration variable Your micro bit takes a single reading of the light sensor in the on start block of code and uses this value to compare against the calibrationValv...

Page 32: ...ark You may have been leaning over the light sensor when the code started Make sure the light sensor is reading the normal light in the room at startup Try resetting the micro bit Still Not Quite Work...

Page 33: ...Breakout with Headers 1x Breadboard 1x Jumper Wire 1x Common Cathode RGB LED 3x 100 Resistors Didn t Get the SIK for micro bit If you are conducting this experiment and didn t get the Inventor s Kit w...

Page 34: ...Fun micro bit Breakout with Headers BOB 13989 Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 LED RGB Diffused Common Cathode COM 09264 2 Resistor 100 Ohm 1 4 Watt PTH 20 pack Thick Leads PRT...

Page 35: ...t colors on and off to combine them For example if you turn on the red pin and green pin the RGB will light up as yellow But which pin is which color Pick up the RGB so that the longest pin common gro...

Page 36: ...ing is connected Polarized Components Pay special attention to the component s markings indicating how to place it on the breadboard Polarized components can only be connected to a circuit in one dire...

Page 37: ...called an event block code that is triggered when something happens and only when that happens In this case it is when one of the onboard buttons is pressed You can select between button A button B an...

Page 38: ...ohm resistor Experiment 5 Reading an SPDT Switch Introduction In this experiment you will use your first digital input a switch The SPDT Single Pole Double Throw switch is a simple way to select betwe...

Page 39: ...ro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest using these parts Breadboard Full Size Bare PRT 12615 18 micro bit Board DEV 14208 3 SparkFun micro bit Breako...

Page 40: ...Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 Mini Power Switch SPDT COM 00102 LED Basic Red 5mm COM 09590 LED Basic Yellow 5mm COM 09594...

Page 41: ...has a common pin in the middle and then two other pins A connection will be made between the middle pin and one of the other pins depending on the position of the switch Reading a switch is similar to...

Page 42: ...ing is connected Polarized Components Pay special attention to the component s markings indicating how to place it on the breadboard Polarized components can only be connected to a circuit in one dire...

Page 43: ...interact with the MakeCode programming environment and simulated circuit Code to Note Let s take a look at the code blocks in this experiment If you are having a hard time viewing this code click on...

Page 44: ...s for the switch are right next to each other Make sure that signal is in the center with voltage and ground on the outside pins If you connect ground and voltage your board will short out and shut do...

Page 45: ...h button by using a digital input We will use it to cycle through different colors on the RGB Parts Needed You will need the following parts 1x micro bit 1x Micro B USB Cable 1x micro bit Breakout wit...

Page 46: ...SparkFun micro bit Breakout with Headers BOB 13989 Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 Multicolor Buttons 4 pack PRT 14460 LED RGB Diffused Common Cathode COM 09264 2...

Page 47: ...familiar with the concepts in these tutorials Switch Basics Analog vs Digital Introducing the Push Button A momentary push button closes or completes the circuit only while it is being pressed The but...

Page 48: ...oward the button of the breadboard are connected Note Not all buttons share this pin format Please refer to the datasheet of your specific button to determine which pins are paired up Hardware Hookup...

Page 49: ...between the upper end and lower end Run Your Script Either copy and paste or re create the following code into your own MakeCode editor by clicking the open icon in the upper right hand corner of the...

Page 50: ...you to set an initial state of a pin by selecting a pin and then its pull state which is UP DOWN or NONE Set Pin to Emit Event Just like the button event in Experiment 4 there are events that you can...

Page 51: ...a standard if elseblock into your program Then click on this small gear in the upper left hand corner of the block This will open a tiny interface with more blocks in it You can drag more else if bloc...

Page 52: ...s working Underwhelmed No worries these circuits are all super stripped down to make playing with the components easy but once you throw them together the sky is the limit Experiment 7 Reading the Tem...

Page 53: ...ro bit Breakout with Headers 1x Breadboard 5x Jumper Wires 1x TMP36 Temperature Sensor Didn t Get the SIK for micro bit If you are conducting this experiment and didn t get the Inventor s Kit we sugge...

Page 54: ...r The TMP36 is a low voltage precision centigrade temperature sensor It provides a voltage output that is linearly proportional to the Celsius temperature It also doesn t require any external calibrat...

Page 55: ...your TMP36 so it s easy to find Hardware Hookup Ready to start hooking everything up Check out the wiring diagram below to see how everything is connected Polarized Components Pay special attention t...

Page 56: ...following code into your own MakeCode editor by clicking the open icon in the upper right hand corner of the editor window You can also just download this example by clicking the download button in th...

Page 57: ...kage for the TMP36 temperature sensor to cut out a lot of complicated math for you to do To add a package to your MakeCode editor first click on Advanced and then Add Packages This will bring up a sea...

Page 58: ...is longer than a single digit it will automatically scroll the value for you Get Temperature on Pin The only block in the TMP36 package is the Get Temperature on Pin block This block does all of the h...

Page 59: ...Experiment 8 Using a Servo Motor Introduction This experiment is your introduction to the servo motor which is a smart motor that you can tell to rotate to a specific angular location You will progra...

Page 60: ...Servo Generic Sub Micro Size ROB 09065 9 Breadboard Full Size Bare PRT 12615 18 micro bit Board DEV 14208 3 SparkFun micro bit Breakout with Headers BOB 13989...

Page 61: ...torial Pulse Width Modulation Introducing the Servo Motor Unlike the action of most motors that continuously rotate a servo motor can rotate to and hold a specific angle until it is told to rotate to...

Page 62: ...the white wire is connected to pin P0 Hardware Hookup Ready to start hooking everything up Check out the wiring diagram below to see how everything is connected Polarized Components Pay special attent...

Page 63: ...on variable to 1 This value will be toggled between 1 and 1 to determine the direction we want the servo to sweep Servo Write We use the Servo Write block to control a servo connected to a specific pi...

Page 64: ...nt 9 Using a Buzzer Introduction In this experiment we will again bridge the gap between the digital world and the analog world We ll be using a piezo buzzer that makes a small click when you apply vo...

Page 65: ...ro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest using these parts Breadboard Full Size Bare PRT 12615 18 micro bit Board DEV 14208 3 SparkFun micro bit Breako...

Page 66: ...Jumper Wires Standard 7 M M 30 AWG 30 Pack PRT 11026 20 Mini Speaker PC Mount 12mm 2 048kHz COM 07950 5 Multicolor Buttons 4 pack PRT 14460 Resistor 10K Ohm 1 4 Watt PTH 20 pack Thick Leads PRT 14491...

Page 67: ...control the speed of turning the piezo on and off and in turn the audio frequency coming out of the buzzer Adjusting the PWM enables you to get legitimate notes out of the buzzer If you flip the buzz...

Page 68: ...be connected to a circuit in one direction Wiring Diagram for the Experiment Having a hard time seeing the circuit Click on the wiring diagram for a closer look Note The full sized breadboard power r...

Page 69: ...y times you want it to repeat and you are done Note that when a melody is playing no other code can run this is called blocking code and has to be accounted for you in your program Play Tone for The p...

Page 70: ...completed even if you press the button or not Feeling Let Down and Deserted Create your own song using just the tone blocks rather than the standard song options given from the start melody block Exp...

Page 71: ...r micro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest using these parts Servo Generic Sub Micro Size ROB 09065 9 Breadboard Full Size Bare PRT 12615 18 micro b...

Page 72: ...lerometer is a component that you won t find in the kit s bag of parts Why Because it is on the micro bit itself On the back of the micro bit you can see a number of small chips One of them is the acc...

Page 73: ...n that the device is in Did you ever wonder how your phone knows when you turn it from portrait to landscape It is all because of the accelerometer in your phone Hardware Hookup Ready to start hooking...

Page 74: ...following code into your own MakeCode editor by clicking the open icon in the upper right hand corner of the editor window You can also just download this example by clicking the download button in th...

Page 75: ...right is positive 1023 Map The map block looks intimidating but it is one of the most useful blocks in MakeCode The mapblock takes a given variable that has a known range in this case 1023 to 1023 an...

Page 76: ...g the Compass Introduction This experiment is just plain fun Have you ever used a compass Are you a little confused in terms of which direction to go Fear not We will build a digital compass that will...

Page 77: ...ro bit If you are conducting this experiment and didn t get the Inventor s Kit we suggest using these parts Breadboard Full Size Bare PRT 12615 18 micro bit Board DEV 14208 3 SparkFun micro bit Breako...

Page 78: ...ecommend you be familiar with the concepts in the following tutorial Pulse Width Modulation Introducing the Compass Magnetometer In the previous experiment you learned about the accelerometer which me...

Page 79: ...ng 270 Pretty cool Now let s put this compass to good use Hardware Hookup Ready to start hooking everything up Check out the wiring diagram below to see how everything is connected Polarized Component...

Page 80: ...between the upper end and lower end Run Your Script Either copy and paste or re create the following code into your own MakeCode editor by clicking the open icon in the upper right hand corner of the...

Page 81: ...nt that returns true when both of the other statements are true and only true What You Should See When your code is loaded you will first see instructions on the micro bit LED array The instructions w...

Page 82: ...al or even a magnet LEDs Seem Backward You might have your logical statement backward Try flipping your greater than to less than or the other way around Resources and Going Further We produce a numbe...

Page 83: ...s So we want to introduce to you the micro arcade kit for the micro bit micro bit Breakout Board Hookup Guide How to get started with the micro bit breakout board For more information on basic electro...

Reviews: