Connect an IR sensor to the micro:bit with alligator clips or an extension board. The photo shows ring:bit with IR sensor attached to pin 1.
micro:bit | IR Remote Control
Connect the BBC micro:bit to MicroBlocks.
Next, import the IR Remote library.
Hint: Make sure you see a green glow around the script. That's how you know it is running!
Run the script below by clicking on it, then press a button on the IR remote control while pointing it at the sensor. You will see the code sent by that button.
Connect a speaker to pin 0 and run this script to make the IR signal audible!
These scripts make a face appear when the code 160 is received. Click to run them.
IR Remote
CC BY-SA 4.0
v1.0