Difference between revisions of "Chapter 9 of KitiBot-Microbit"
Line 4: | Line 4: | ||
First we should add the package for 2.4G, note that its package could not be used with Bluetooth at the same time. | First we should add the package for 2.4G, note that its package could not be used with Bluetooth at the same time. | ||
− | [[File:add package for radio.png| | + | [[File:add package for radio.png|600px]] |
+ | |||
+ | There are three types of radio blocks. Send, receive and initial | ||
+ | |||
+ | note: you should set the boards to the same wireless group for normal communication | ||
+ | |||
+ | [[File:radio class.png|600px]] | ||
+ | |||
+ | ===Buttons=== | ||
+ | --- | ||
+ | |||
+ | [[File:radio code.gif]] | ||
+ | |||
+ | [[File:radio code-1.png|500px]] | ||
+ | |||
+ | Press button A or B of one micro:bit, and another will show characters A or B on LED matrix | ||
+ | |||
+ | ===Radio control KitiBot=== | ||
+ | ---- | ||
+ | [[File:joystick board.png|600px]] | ||
+ | |||
+ | We have learned how to use radio above, here we learn to use radio to control KitiBot by the module [https://www.waveshare.com/wiki/Joystick_for_micro:bit Joystick for micro:bit]. | ||
+ | |||
+ | To use the Joystick for micro:bit, you need to install WSJoyStick package.https://github.com/waveshare/JoyStick | ||
+ | |||
+ | [[File:add package for joystick microbit.gif]] | ||
+ | |||
+ | The block in WSJoyStick package are: Initialize block JoyStickInit, Key detect block Key P Press and DIR dir NONE block. | ||
+ | |||
+ | [[File:blocks in joystick package.png|500px]] | ||
+ | |||
{{Chapters of Kitibot micro:bit}} | {{Chapters of Kitibot micro:bit}} |
Revision as of 10:27, 18 August 2018
2.4G Communication
You need at least two micro:bit for 2.4G testing
First we should add the package for 2.4G, note that its package could not be used with Bluetooth at the same time.
There are three types of radio blocks. Send, receive and initial
note: you should set the boards to the same wireless group for normal communication
Buttons
---
Press button A or B of one micro:bit, and another will show characters A or B on LED matrix
Radio control KitiBot
We have learned how to use radio above, here we learn to use radio to control KitiBot by the module Joystick for micro:bit.
To use the Joystick for micro:bit, you need to install WSJoyStick package.https://github.com/waveshare/JoyStick
The block in WSJoyStick package are: Initialize block JoyStickInit, Key detect block Key P Press and DIR dir NONE block.