0% found this document useful (0 votes)
372 views5 pages

4tronix Bit:bot Makecode Starter Guide

This tutorial teaches how to add the Bitbot extension to the MakeCode editor, write code to sound the buzzer and turn the LEDs red, load the code onto the micro:bit, and run the program on the Bitbot robot.

Uploaded by

Bobby
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
372 views5 pages

4tronix Bit:bot Makecode Starter Guide

This tutorial teaches how to add the Bitbot extension to the MakeCode editor, write code to sound the buzzer and turn the LEDs red, load the code onto the micro:bit, and run the program on the Bitbot robot.

Uploaded by

Bobby
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

4tronix makecode starter guide: Part 1 - Running a program on your Bitbot

(LEDs and Buzzer)

4tronix bit:bot makecode starter


guide
This tutorial is the first in a multi-part series of makecode tutorials for the 4tronix Bitbot robot for
the BBC micro:bit. The tutorial uses the most current editor at the time of writing.

In part 1, you’ll learn:


1. How to add the Bitbot extension to the makecode editor
2. Write code to sound the buzzer and turn the Bitbot’s LEDs red
3. Load your code onto the micro:bit and run it in your Bitbot

The code for this activity can be found at ​https://makecode.microbit.org/_XjAUoq04ALRa

Add the bit:bot extension to the makecode


editor
❏ In your browser, navigate to ​https://makecode.microbit.org/#editor
❏ Once in the PXT editor, you’ll see the command categories. Click on ​Advanced​ (outlined
below)

Page 1 of 5
4tronix makecode starter guide: Part 1 - Running a program on your Bitbot
(LEDs and Buzzer)

❏ Click on the Extensions category (outlined below)

Page 2 of 5
4tronix makecode starter guide: Part 1 - Running a program on your Bitbot
(LEDs and Buzzer)

❏ Type ‘bitbot’ into the search bar, and select the official bit:bot extension (outlined in blue)

❏ When this is loaded, you should see a new red ​Bitbot ​category below the ​Math​ one, as
shown below.

❏ You have now successfully loaded the Bitbot commands that can be dragged across to the
programming area on the right of your editor!

Sound the buzzer and turn the LEDs red


❏ In your PXT editor, click on ​Bitbot > Sensors​ and drag the required blocks across as shown by
the yellow arrow below.

Page 3 of 5
4tronix makecode starter guide: Part 1 - Running a program on your Bitbot
(LEDs and Buzzer)

❏ Continue to drag the blocks into the ​on start​ section. Once your code is loaded onto the
micro:bit in your Bit:bot robot and the power is switched ​ON​, these commands will be run.

Loading your code onto your micro:bit


❏ Once you’ve written your code, you can plug your micro:bit into your computer using a
microUSB cable. The examples here show a mac screen, but the process will be similar in
Windows. Once the micro:bit is plugged into your computer, you should see it in your file
explorer, similar to a USB memory stick. It will be called ​MICROBIT​.

❏ In the bottom left of your PXT editor, click on the Download button shown below.

❏ You’ll then be prompted to save a .hex file. Click save to send your code to the micro:bit. The
light on the back of the micro:bit will flash as the code is being written - once it stops,
remove the microUSB cable from the micro:bit and insert the micro:bit into the Bit:bot.

Page 4 of 5
4tronix makecode starter guide: Part 1 - Running a program on your Bitbot
(LEDs and Buzzer)

Run your code on the Bit:bot robot


❏ Make sure you have 3 fresh alkaline batteries (don’t use rechargeables as they don’t have
enough voltage), in the Bit:bot, and turn the power switch at the rear of the robot, to ​ON.
If all goes well, you should hear the buzzer and see the LEDs on both sides of the Bit:bot light
up red.

❏ Congratulations! Your code is now running on your Bit:bot!

Page 5 of 5

You might also like