Color & Gesture Module

Color & Gesture Module (HKBM8012F)


This is a multifunctional module, the main features are Color detection and Gesture detection.




This module has 4 modes:

  1. In Color Mode, the 4 LEDs light up. It can detect color or ambient light level.

  2. In Gesture Mode, the LEDs light up corresponding to the direction of movement.

  3. In Proximity Mode, it can detect objects with a 3cm range. The LEDs brightness are determined by the proximity of the object.

  4. In LED Mode, the 4 LEDs can be controlled.




  • Voltage: 3V-5V

  • Dimensions: 56mm X 24mm X 16mm

  • Connector: 4Pin PH2.0

  • Color Mode Return Value: 0-360, corresponding to hue

  • Gesture Mode Return Value: 0-4, corresponding to None, Up, Right, Down, Left

  • Proximity Mode Return Value: 0-255, with a range of approximately 3cm

  • Brightness Return Value: 0-255


  • This module must be connected to I2C port.

  • The module defaults to Proximity Mode if mode has not been set.

  • For gesture detection, practice maybe needed to get the correct distance and speed for successful detection.

  • For color detection, the return value is a Hue value from HSV format.

  • Color detection has the best effects when the object is about 1cm away.

  • The LEDs can only be controlled in the LED Mode.

Connecting the module


Connect the module to the I2C Port of Armourbit using a 4Pin Cable.



Connect the module to the I2C Port of Robotbit.

Blue(A)->SCL, Green(B)->SDA


MakeCode Coding Tutorial


Powerbrick Extension:

Loading Extensions

Color Gesture Module Blocks



Detecting Color


Sample Code Link

HSV Color Wheel:


Detecting Ambient Brightness


Sample Code Link

Detecting Proximity


Sample Code Link

Detecting Gesture


Sample Code Link

Controlling LEDs


Sample Code Link

Makecode Tutorial Video


Extension Version and Updates

There may be updates to extensions periodically, please refer to the following link to update/downgrade your extension.

Makecode Extension Update

KittenBlock Coding Tutorial


Load Powerbrick Extension

Select Powerbrick from the hardware column.


Color Gesture Module Blocks


Detecting Color


Sample Code Download

Detecting Ambient Brightness


Sample Code Download

Detecting Proximity


Sample Code Download

Detecting Gesture


Sample Code Download

Controlling LEDs


Sample Code Download


1:Why is there no reaction when I click the blocks?

Make sure you have connected the Micro:bit correctly and flash the firmware again.