Cheap Chinese IR remote controls powered by a CR3220 coin cell often feature a 3×7 (21) key matrix, though some positions may be unused depending on the variant.
Most use the SC6122 IC, typically implemented as a COB (Chip-On-Board), where the bare silicon die is directly mounted and wire-bonded onto the PCB rather than packaged and covered with an epoxy 'Glob-on-Top'.
These remotes generally transmit signals using the NEC IR protocol, modulated at 38 kHz, with standard NEC timing (logical ‘0’ ≈ 562 µs pulse + 562 µs space, logical ‘1’ ≈ 562 µs pulse + 1.687 ms space).
There is no standard mapping from key position to raw IR code, so codes vary between models and manufacturers. This extension was created to make it easier to integrate the various RC models into your micro:bit project.
- Determine the raw IR codes for your RC model, e.g. using ShowRawIRCode
- Edit main.ts :
- add 'export function init_<your_model> () void: {'
- add your table IR codes e.g. '_nul = 255' for all buttons present on your remote
Add the extension to your project. Now a function block init_<your_model> is available for use in the 'at startup' loop.
- HX1338 Often included in cheap chinese IR receiver kits. Use block 'init_rc_hx1838'.
- Keyestudio remote Packaged with several products from Keyestudio. Use block 'init_rc_keyestudio'.
- Baltimore remote Included with several Baltimore floodlights such as 3000 lumen, 50W LED Floodlight (ZD Trading Model No. 3005472). Use block 'init_rc_baltimore'.
Deze repository kan worden toegevoegd als extensie in MakeCode.
- open https://makecode.microbit.org/
- klik op Nieuw project
- klik op Extensies onder het tandwielmenu
- zoeken naar https://github.com/roboracemsw/remotecontrolmapping en importeren
Om deze repository te bewerken in MakeCode.
- open https://makecode.microbit.org/
- klik op Importeren en klik vervolgens op Importeer URL
- plak https://github.com/roboracemsw/remotecontrolmapping en klik op importeren
- for PXT/microbit

