Coding++ – Coding beyond screens

Color Element

Make a cash register by creating a system that uses colors instead of barcodes for prices. Construct a candy dispenser that allows the selection of flavor and color of candy.

The Plezmo Color Element can recognize the color of an object and can distinguish between 7 colors. Use it to differentiate between various colored things or to sort things into categories

Detect colors
Detect Luminosity (Brightness / Darkness)

What's Inside

Size: 40mm x 40mm x 10mm

Battery Life: approximately 4hrs

Key hardware components:

  • Smart power module to regulate the power to the element and manage charging of the battery
  • Intelligent BLE-module for communication with Apps
  • Tricolor (RGB) LEDs for status indications
  • Accelerometer to support basic features like double-tap to wake-up
  • Long-lasting 250mAH Li-Polymer battery
  • An intelligent sensor that senses color, proximity and ambient light.
  • A powerful white LED to sense colors reliably in varied lighting conditions

Color Sensor

Def colorEventListner1():



#When color senses particular color. E.g. RED

Color.onColorChange(‘Color’, colorEventListner1, ColorSensorColor. RED)

Brightness sensor

Def colorLightEventListner1():



#When color senses Brightness

Color.onLightEvent(‘Color’, colorlightEventListner1, ColorSensorLightState. BRIGHT)

Get light around in lux

#Get Light (Brightness) value in lux around the sensor


Get light around in percentage

#Get Light (Brightness) value in percentage around the sensor


Get particular colored light around in lux

#Get Color Component (Red, Green, Blue), of the light around sensor

Color.getLightComponentValueInLux(‘Color’, LightComponent . RED)

Here are some videos you can watch

Scroll to Top