... | ... | @@ -41,7 +41,7 @@ |
|
|
|
|
|
This lab enables students to learn about communication interception through a hands on approach with Micro:Bots. We will demonstrate the use of radio technology as a means for remote control and the potential for radio wave hijacking. Students will learn the fundamentals of Bluetooth and radio waves through implementation by using one micro:bit as a controller for another micro:bit embedded in a robot.
|
|
|
|
|
|
### Step 0: The Basics
|
|
|
## Step 0: The Basics
|
|
|
---
|
|
|
* Micro::Bit Coding Options
|
|
|
* [Click here to code with JavaScript/Blocks] (https://makecode.microbit.org)
|
... | ... | @@ -50,14 +50,14 @@ This lab enables students to learn about communication interception through a ha |
|
|
* [Click here for Micro:Bit radio basics](https://makecode.microbit.org/reference/radio)
|
|
|
|
|
|
|
|
|
### Step 1: Gather Materials
|
|
|
## Step 1: Gather Materials
|
|
|
---
|
|
|
* Micro::Bit (1 per person / 2 per team)
|
|
|
* Micro-USB Cable
|
|
|
* Battery Pack (Equivalent to two AA batteries)
|
|
|
* Microbot
|
|
|
|
|
|
### Step 2: Get Familiar With Microbots
|
|
|
## Step 2: Get Familiar With Microbots
|
|
|
Radios work by sending and receiving messages over different channels. This allows you to use on Micro:Bit to send messages and another to receive them. In this lab, you will use a Micro:bit as a controller to get user input and then send messages based on those inputs. Then, you will use a second Micro:bit to receive messages from the controller and then control the robot based on those received messages.
|
|
|
|
|
|
Start this lab by going over this basic programming example.
|
... | ... | @@ -70,7 +70,7 @@ The first set of code is for the Micro:Bit controller. This controller waits for |
|
|
|
|
|
The second set of code is for the Micro:Bot robot. This Micro:Bit waits to receive a message. If they receive a "left" message, it tells the robot to go left. If they receive a "right" message, it tells the robot to go right.
|
|
|
|
|
|
### Step 3: Download The Files
|
|
|
## Step 3: Download The Files
|
|
|
---
|
|
|
* Download (click on) the following file to get started: [MicroBotLab.zip](/uploads/99bcb034cdee9aad07dcc403efcdbe35/MicroBotLab.zip)
|
|
|
|
... | ... | @@ -82,7 +82,7 @@ The second set of code is for the Micro:Bot robot. This Micro:Bit waits to recei |
|
|
|
|
|
![microbot_files](/uploads/55820c43e18aa35782b09b8757501741/microbot_files.PNG)
|
|
|
|
|
|
### Step 4: Open your editor
|
|
|
## Step 4: Open your editor
|
|
|
---
|
|
|
* For JavaScript/Blocks, you will use the Micro::Bit online editor: [MakeCode](https://makecode.microbit.org/). Here, you can switch back and forth between JavaScript and Blocks by clicking on the button/slider in the top center of the screen.
|
|
|
|
... | ... | @@ -90,7 +90,7 @@ The second set of code is for the Micro:Bot robot. This Micro:Bit waits to recei |
|
|
|
|
|
* For Python, you can use Mu ([click here to see Mu](https://codewith.mu/)) or the online editor ([click here to get to the online editor](http://python.microbit.org/v/1)).
|
|
|
|
|
|
### Step 5: Get Moto-Bit library
|
|
|
## Step 5: Get Moto-Bit library
|
|
|
---
|
|
|
* For JavaScript/Blocks, start by selecting the "Advanced" drop down box in the libraries toolbar.
|
|
|
|
... | ... | @@ -108,7 +108,7 @@ You can check to make sure that you have the library by searching for the librar |
|
|
|
|
|
![microbot_lib4](/uploads/50880517646fef4065f781d017771d02/microbot_lib4.PNG)
|
|
|
|
|
|
### Step 6: Programming!
|
|
|
## Step 6: Programming!
|
|
|
---
|
|
|
1. Partner up
|
|
|
2. Open the robot base code by:
|
... | ... | @@ -458,7 +458,7 @@ You can check to make sure that you have the library by searching for the librar |
|
|
7. Now try to intercept other robots. Are you able to control another group's robot simply by changing what radio group you set your controller to?
|
|
|
|
|
|
|
|
|
### Step 7: Further Exploration
|
|
|
## Step 7: Further Exploration
|
|
|
---
|
|
|
* Can you think of a way to incorporate a reverse function for the microbot? What if you needed to push and hold a+b to make it move in a direction? How would you select between forward and reverse? Spend some time exploring with your Micro::Bit and see what kind of improvements you can make.
|
|
|
|
... | ... | |