The LAMP:bit - Part 1

May 10, 2019 3 min read

Learn the first steps to using the LAMP:bit extension with your micro:bit!

How do I code my micro:bit to control the lamp?

The LAMP:bit is a really cool, interactive attachment for the micro:bit. I’ll be showing you how to code the LAMP:bit so you can control the lights either with a button, or without even touching it!

For this, you’ll need the following: 

First, you need open MakeCode on your device and download theLAMP:bit extension for the micro:bit. To find the extension, go to the settings, click extensions, and search for “lampbit”. The extension is called 'kitronik-lampbit' and after you download it, it should appear in the code blocks. 

Next, you need to drag a pink input block into theprogram spaceand choose which button will control it. To add a code block, you click on the one you want and then drag one of them onto the program space.You can add a new input block for each button. For more about input's, you can read MakeCode's handy help guide!

Then, drag the ‘turn lamp light on/off’ code block into the input area and choose what the button will make the light do. You can add more input code blocks, so button A turns the lamp on, and button B turns it off. Now your program space should look a bit like this!  

Now you're ready to download your code, and upload it to your micro:bit! I showed you how to do this in my last blog, "How to use MakeCode". You can also learn how to do it with MakeCode's help guide. Don't forget to leave a comment below to let me know if this helped you, and what cool things you did with your LAMP:bit!

First, you need open MakeCode on your device and download theLAMP:bit extension for the micro:bit. To find the extension, go to the settings, click extensions, and search for “lampbit”. The extension is called 'kitronik-lampbit' and after you download it, it should appear in the code blocks. 

Next, you need to drag a pink input block into theprogram spaceand choose which button will control it. To add a code block, you click on the one you want and then drag one of them onto the program space.You can add a new input block for each button. For more about input's, you can read MakeCode's handy help guide!

Then, drag the ‘turn lamp light on/off’ code block into the input area and choose what the button will make the light do. You can add more input code blocks, so button A turns the lamp on, and button B turns it off. Now your program space should look a bit like this!  

Now you're ready to download your code, and upload it to your micro:bit! I showed you how to do this in my last blog, "How to use MakeCode". You can also learn how to do it with MakeCode's help guide. Don't forget to leave a comment below to let me know if this helped you, and what cool things you did with your LAMP:bit!

RELATED PRODUCTS

READ NEXT:

The LAMP:bit - Part 2


Leave a comment

Comments will be approved before showing up.

Subscribe