View on GitHub

RemoteControlMapping

Functions for IR-code to Key mapping for IR Remote Controls

Remote Control Mapping

Various 21 ke IR-RC incarnations

21 Key IR Remote controls

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).

Internals

RC Internals

Mappings

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.

Adding a new RC model

  1. Determine the raw IR codes for your RC model, e.g. using ShowRawIRCode
  2. Edit main.ts :
    • add ‘export function init_ () 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_ is available for use in the 'at startup' loop.

Current mappings available

Gebruiken als extensie

Deze repository kan worden toegevoegd als extensie in MakeCode.

Dit project bewerken

Om deze repository te bewerken in MakeCode.

Metadata (gebruikt voor zoeken, rendering)