Gravity: I2C RGB LED Button Module

SKU: DFR0991

This is an I2C button module with RGB LED. The module not only supports reading button status like conventional ones, but also can control RGB LED color and switch on/off the light independently, which could create more visual and interactive experiences for your projects.For example, if the system prompts users to press a button, then the corresponding RGB LED shows a blinking green light; when users pressed the button, the light turns red.This module has onboard 3bit DIP switch for setting 8 different I2C addresses, which means up to 8 such button modules can be cascaded together without occupying additional ports.

Front of I2C RGB LED button module with switch and labeled pins-DFRobot product sku:DFR0991 image.
  • Docs
  • Tech Specs
  • 1. Example Code for Arduino-Read Button Status

    This article offers a comprehensive guide on reading button status with Arduino, including hardware and software setup, wiring instructions, and sample code for detecting button actions using an RGB LED.

    2. Example Code for Arduino-Control RGB LED Color

    The article presents a comprehensive guide on controlling RGB LED colors with Arduino, featuring hardware and software preparation, wiring instructions, and sample code to display conventional and random colors.

    3. Example Code for Arduino-Control RGB LED Brightness

    In this sample, we will learn how to control the brightness of RGB LED and the hardware connection remains. The LED color is set to blue so that we can focus on brightness changes.

    4. Example Code for Arduino-Control Breathing Light

    This article introduces an Arduino project that combines reading button status and controlling an RGB LED to create a breathing light effect, offering practical learning for electronics enthusiasts.

    5. Example Code for Arduino-Interrupt Function

    The article provides example code for utilizing Arduino's interrupt function with a button module as an I2C slave, focusing on the interactive communication mode enabled by the INT pin.

    6. Example Code for Arduino-Point Counter

    This guide offers step-by-step instructions and example code for creating a point counter using an Arduino, OLED display, and button modules, providing an excellent starting point for beginners in electronics.

    7. Example Code for Arduino-Button Cascading

    Designed with I2C, multiple modules are allowed to be cascaded without occupying additional ports. In this sample, six button modules will be cascaded and controlled independently without affecting each other.

    Reference

    Specification

    Parameter Details
    Adjustable Color Range R: 0-255, G: 0-255, B: 0-255
    Maximum Cascading Modules × 8
    Operating Voltage DC 3.3V~5V
    Button Travel Distance 2.2±0.2mm
    Button Life 200,000 continuous presses
    Interrupt Mode the interrupt port outputs high level when the button is pressed
    Communication Mode I2C
    Connector PH2.0-4P (Gravity standard), 2.54-5P pin header
    Dimensions 37mm×32mm×19.5mm/1.46×1.26×0.77"

    Pinout

    Pin Full Name Description
    D SDA I2C Data Line
    C SCL I2C Clock Line
    + VCC Positive Power Supply (DC 3.3V~5V)
    - GND Negative Power Supply
    INT Interrupt External Interrupt

    Was this article helpful?

    TOP