Transmitter Project for Keyboard Inputs
Let’s build on experience, and adapt a familiar project from a previous tutorial to use keyboard inputs.
Starting with the countdown_sender project from the Send and Receive Packets activity, you can replace its input statements with the ones from terminal_controlled_bot_tethered_try_this. Then, the dictionary that’s created has to be adjusted to contain the vL, vR, and ms keys and values. That’s the most crucial part of incorporating the terminal-in, radio-out part of your tethered app into a project that wirelessly transmits.
You will also need to make a few other adjustments. Here they are, step-by-step:
- Open the countdown_sender project from Send and Receive Packets.
- Find these blocks:
- Replace them with these blocks we made earlier:
- Then find this block:
- Replace it with this block:
- Find these blocks:
Replace it with this block:
- Make sure your using the radio send long string block:
- If you are in a classroom and using assigned channels, update your channel.
- Duplicate and rename the project terminal_bot_controller_wireless.
Now, your project should be ready.
- Verify the changes you made against the example project shown below.
- Load the code into the micro:bit you plan to use as the transmitter.