Controlling the Robot with Infrared
Infrared communication
In this unit we will see how to control the robot wirelessly using infrared technology.
This technology is based on sending infrared waves between two LEDs (one emitter and one receiver).
As the ED1 board has an infrared receiver built in, we can use any television remote control or a generic one to send commands to it.
Infrared library
- In order to be able to use the infrared receiver on the board, you need to import the IR Remote library under the Other folder.
Although there is a block to initialize the receiver in our case it is not needed, since the block to receive codes calculates it automatically. It would only be necessary if you have another board and an external receiver.
To receive codes you just need to use the corresponding block and press a button on the remote to test if it works.
Challenge 1: Make a program that moves the robot with the remote.
Solution to challenge 1
⬅️ Previous activity | Next activity ➡️ |
---|
© Citilab Edutec tarafından 2019-2022.
This work is licensed under a CC-BY-SA 4.0 license.