How do I code my micro:bit to control the barrier?
For this, you’ll need the following:
- BBC micro:bit
- ACCESS:bit
- Micro USB cable
- Computer/laptop with a USB port and internet access
- Pen and paper to plan your code
Check out our latest news to find out more about events, opportunites and partnerships.
Esmes' Electronics is a simple introduction to using the micro:bit written by a year 5 student.
Learn with Troy by asking for support and, he will post a tutorial here to benefit all of our visitors. Free advice!
Discover tips, ideas and free resources to make remote learning engaging and stimulating.
Contact us now to request your own tutorial or learning resource.
Announcments
Check out our latest news to find out more about events, opportunites and partnerships.
Esmes' Electronics
Esmes' Electronics is a simple introduction to using the micro:bit written by a year 5 student.
Troys' Tutorials
Learn with Troy by asking for support and, he will post a tutorial here to benefit all of our visitors. Free advice!
The Amelia Branson Column
Discover tips, ideas and free resources to make remote learning engaging and stimulating.
Get professional support
Contact us now to request your own tutorial or learning resource.
Contact us now to request your own tutorial or learning resource.
Get Professional Support
Contact us now to request your own tutorial or learning resource.
Add description, images, menus and links to your mega menu
A column with no settings can be used as a spacer
Link to your collections, sales and even external links
Add up to five columns
Add description, images, menus and links to your mega menu
A column with no settings can be used as a spacer
Link to your collections, sales and even external links
Add up to five columns
For this, you’ll need the following:
Make sure when you attach your micro:bit that it looks exactly like this photo.
Have a look at this Assembly Guide to see how to put it together.
For this project, you'll need to download the ACCESS:bit extension on MakeCode. Once you've done that, the first thing to do is add an "on start" basic code block. We want the barrier to be down when we turn it on, so add a "move barrier" code block from the ACCESS:bit extension and change the action to "down". It should look like this:
Now that the barrier will be down when you turn it on, you can add an input code block so the barrier moves when you press a button. I want the barrier to move when I press the "A" button, so I added this code block:
Some of my blogs use extra accessories for the micro:bit, like the LAMP:bit. These need their own set of special code blocks, which you need to download. Click on the settings icon at the top of the screen, and go to "extensions".
Now you can search for any extra code blocks you might need! Click on the one you want to download, and the new code blocks should appear with the rest of the code blocks. In the screenshot below, I searched for the LAMP:bit.
I got a bit stuck a few times when I was doing this activity, so it helps to have a Teacher or someone who can help you around just in case. Make sure your micro:bit is attached the same way as it is in the photo above this, otherwise the ACCESS:bit won't react to the code at all.
Comments will be approved before showing up.
Subscribe to our monthly newsletter for sneak peeks at new collections and early access to promos and flash sales!