... | ... | @@ -100,16 +100,8 @@ You can check to make sure that you have the library by searching for the librar |
|
|
**Partner up first!**
|
|
|
|
|
|
### Complete the Robot Code
|
|
|
1. Open the robot base code by:
|
|
|
1. Go to the files you downloaded from above
|
|
|
2. Double-click on the JavaScript or Python folder
|
|
|
3. Right-click on robot_base (JavaScript) or robot_base (Python)
|
|
|
4. Select "Open with Visual Code", "Open with Notepad++", or "Open with Notepad"
|
|
|
5. Highlight all of the text and copy it (right-click and copy or ctrl+c)
|
|
|
6. If you are using JavaScript/Blocks, in the editor, select the JavaScript button in the center-top of the page. If you are using Python, simply go to your editor.
|
|
|
7. Delete all of the existing code in the editor
|
|
|
8. Paste your code into the editor
|
|
|
9. If you are using Blocks, to get back to blocks, you can select the Blocks button in the center-top of the page.
|
|
|
1. Open the **robot base code**
|
|
|
* If you forgot how to open code in an editor click [here](how-to-download-and-open)
|
|
|
2. Complete the robot code. You will add channel choosing functionality and give the motobit commands after receiving a radio transmission from the controller:
|
|
|
* When *button a* and *button b* are pressed, set the radio group
|
|
|
* When *button a* is pressed, if the radio group has not been set, decrement the radio group by 1
|
... | ... | @@ -122,17 +114,9 @@ You can check to make sure that you have the library by searching for the librar |
|
|
3. Generate your robot **.hex file** and flash your robot Micro::Bit. If you don't remember how to flash code to your Micro::Bit, see the instructions [here](how-to-flash).
|
|
|
|
|
|
### Compelete the Controller code
|
|
|
1. Open the controller base code by:
|
|
|
1. Go to the files you downloaded from above
|
|
|
2. Double-click on the JavaScript or Python folder. Stick with the same language as you chose for the robot_base
|
|
|
3. Right-click on controller_base (JavaScript) or controller_base (Python)
|
|
|
4. Select "Open with Visual Code", "Open with Notepad++", or "Open with Notepad"
|
|
|
5. Highlight all of the text and copy it (right-click and copy or ctrl+c)
|
|
|
6. If you are using JavaScript/Blocks, in the editor, select the JavaScript button in the center-top of the page. If you are using Python, simply go to your editor.
|
|
|
7. Delete all of the existing code in the editor
|
|
|
8. Paste your code into the editor
|
|
|
9. If you are using Blocks, to get back to blocks, you can select the Blocks button in the center-top of the page.
|
|
|
2. Complete the controller base code. You will add channel choosing functionality and send radio commands depending on the buttons pressed:
|
|
|
1. Open the **controller base code**
|
|
|
* Remember to stick with the same programming language as you chose for the **robot**
|
|
|
1. Complete the controller base code. You will add channel choosing functionality and send radio commands depending on the buttons pressed:
|
|
|
* When *button a* and *button b* are pressed, if the radio channel has not already been set, set it.
|
|
|
* If the radio channel has already been set, send a *forward* command over the radio
|
|
|
* When *button a* is pressed, if the radio group has not been set, decrement the radio group by 1.
|
... | ... | @@ -140,7 +124,7 @@ You can check to make sure that you have the library by searching for the librar |
|
|
* When button b is pressed, if the radio group has not been set, increment the radio group by 1.
|
|
|
* If the radio group has been set, send a *right* command over the radio
|
|
|
|
|
|
3. Generate your controller **.hex file** and flash your controller Micro::Bit. If you don't remember how to flash code to your Micro::Bit, see the instructions [here](how-to-flash).
|
|
|
2. Generate your controller **.hex file** and flash your controller Micro::Bit. If you don't remember how to flash code to your Micro::Bit, see the instructions [here](how-to-flash).
|
|
|
|
|
|
<details>
|
|
|
<summary>
|
... | ... | |