Roversa allows students to progress from simple computer science concepts like sequences and directional language to more advanced concepts in a unified environment. You can use the MakeCode extension to introduce students to more advanced computer science concepts like loops, conditions and variables, as they reprogram the buttons on Roversa.
Type roversa into the search box.
Select the roversa extension.
With the Roversa blocks you can update what any of the buttons do.
Use the following blocks to reprogram the buttons on Roversa.
In this example of using the Roversa button block, the LED screen will update when the Forward arrow button is clicked.
click - code will trigger with a single click of the button
down - code will trigger when button is pressed down
up - code will trigger after button is pressed and returns up
In this example of using the Roversa “is pressed” block, the LED screen will update if the Forward arrow button is pressed. For conditional (if statement) blocks like this, you usually want to put into a forever loop, so the program is always checking for the condition.
There are two sets of blocks to control the servos: basic and advanced.
There are the basic blocks:
drive forward - drives forward the default distance and then stops
drive backward - drives backward the default distance and then stops
turn right - turns right 90 degrees and then stops
turn left - turns left 90 degrees and then stops
These are the advanced blocks.
drive forwards - drives forward the requested distance and then stops
drive backwards - drives backward the requested distance and then stops
turn right - turns right the requested degrees and then stops
turn left - turns left the requested degrees and then stops
stop - stops the servos
distance - in millimeters
degrees - in degrees
This code updates the Forward arrow button to move in a square pattern.
Use the repeat block to loop the repeating pattern of “drive forward” and “turn right”.
These buttons allow you to calibrate the Roversa servos. Find out more about the coding behind the Calibrate and other buttons here.
Bias - use bias to ensure that the servos are moving in a similar fashion. This will allow you to change the left or right motor regardless of trim.
Left motor: 0-50
Right motor: 50-100
Drive amount - allows the setting of Roversa forward / backward distance. This allows tuning for the move x distance commands.
Turn amount - allows the setting of Roversa turn amount. This allows tuning for the turn x degrees commands
Click on 3 dots (...) next to Download.
Select Connect Device.
Select Next.
Select Pair.
Click on the micro:bit name in the list and select Connect.
The file will now download onto the micro:bit (a light on the back of the micro:bit will flash while your code is downloading).
The next time you click Download during this session, it should remember this connection.
Select Download.
Open up folders on your computer.
Locate the .HEX file in your downloads folder.
Drag that .HEX file to the MICROBIT location (a light on the back of the micro:bit will flash while your code is downloading).
You can return your Roversa to Factory Settings any time by updating the firmware.
Download the firmware (.hex file) onto your computer.
Plug the micro:bit into your computer via USB.
Drag the .hex file onto the micro:bit. You should see a light flashing under the micro:bit.
When you attach the micro:bit to Roversa and turn on the power, you should see a smiley face.