Micro:bits Lights for Beginners

by tylerjean in Circuits > Microcontrollers

445 Views, 1 Favorites, 0 Comments

Micro:bits Lights for Beginners

39FBC347-099B-4ACB-AD72-353645939768.jpeg

For this instructable you will need a Micro:Bit and a laptop, cannot be a Mac. If you are using a Mac an additional step is required or an adapter for a USB port is required.

Supplies

  1. Laptop (Non-Mac)
  2. Micro:bit

Get Connected

1AE75F82-7218-4387-AABE-C197D5C260CA.jpeg
4D052C0C-3616-45AE-8EDD-2C1B09296FC3.jpeg
1976A043-D56B-4215-8FD6-625E1EA8F9AB.jpeg

First you will locate the battery pack, it's the item with the red and black cords sticking out of it, and the small black box contains batteries. Plug the battery pack into the Micro:bit device. Next, you will take the USB cord, small and black, and plug it into the Micro:bit. Once both of these items are plugged into the Micro:bit, you will locate the USB port on your laptop and plug it in.

Website

E38F2D41-632E-4F4E-A53B-EC6FB54C367F.jpeg
2EE3749B-97F6-48B3-9D26-CECFEB8B508D.jpeg
821EF94C-FC9C-467D-BC11-39020198D834.jpeg

Next you will go to Google.com and Search, Micro:Bit. After the results have popped up you will see the microbit.org website. Click on the MakeCode link which is a direct route to the coding area. Once in you will see a screen that looks like picture #2. Click on "Create New Project". Once you've clicked that you are taking to a screen that looks like image #3, with blue coding blocks already put in the coding area.

Get Started

CFA9E18B-5BD4-4258-B2D9-794677641093.jpeg
9F892805-8451-433B-986C-8361019AD7C2.jpeg

Remove the forever and on start blocks by clicking on them and dragging them back to the block menu. **Notice the trash cans pops up after you begin to drag it." In your menu bar then click input, and find the block that states "on button A press", click and drag to the work area. (Grey area to the right of the block menu)

Code

9ED3EFEA-34EB-4C17-8276-CB094EE8A04C.jpeg
44D408CD-EF82-4BC6-8E75-729303ECBE43.jpeg
39108128-8048-4536-B084-556A7EF6F508.jpeg

After completing the last step your worspace should look like picture 1. Go to the Basic menu and find the block that states, "Show LEDs" , drag it in the middle of your purple block, once you let go it will then place it perfect when it should go within the "on button a is pressed" block. Begin to click some of the little squares.

Download and Test

9E3B87A9-F539-43F2-90A1-37FB09ACFA9D.jpeg
3C64B119-73D7-4850-AC8A-E778E7A966EA.jpeg
E068685E-3290-47B5-A951-178D137CB512.jpeg

Once you have clicked on the desired lights you want lit when pressing "A" click on the download button. This action will download the code into the micro bit. Once it is done downloading press A on your Micro:bit. You should see your selected lights, light up. You can even unplug the Micro:bit from the laptop!