4X4 RGB Click Board
4X4 RGB Click Board
The 4x4 RGB Click Board™ is an add-on board that helps the user to add a colourful RGB LED matrix to the design. This accessory board comes equipped with a matrix of 16 very bright WS2812 RGB LEDs and an MCP1826 low dropout regulator. Each of these 16 LEDs further comprises three single coloured LEDs (Red, Green and Blue), and a control chip. Put together, there are a total of 48 individual LEDs in 4x4 RGB Click Board™. The control circuit and RGB chip have been integrated into a package of 5050 components to keep pixel points in complete control. 4x4 RGB Click Board™ features a jumper (zero Ω resistor) for setting the I/O logic level. It is by default soldered in the 3.3V position but can make use of either a 3.3V or 5V power supply. The LED matrix is connected to the target board microcontroller through the MikroBUS RST pin.
The 4x4 RGB Click Board™ can be used to create animations that can be scrolled on a computer screen. It is also usable for producing spellbinding displays of colourful graphics on electronic billboards, signs, and similar interfaces.
.
Software Support
We provide a library for the 4x4 RGB Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library performs control of the LED colour and light effects. Library uses LED colour control to perform some applications, like snake application in different colours and screen light also in different colours. The LED matrix on the 4x4 RGB click is connected to the target board microcontroller through the mikroBUS RST pin.
Key functions
void RGBLed_ZeroBit()
- Determines logic low state for the LED diode.
void RGBLed_OneBit()
- Determines logic high state for the LED diode.
void RGBLed_ResetDelay()
- Reset function which includes the determined delay time.
void RGBLed_InitDiode(unsigned long ARGBColor, unsigned long * AdiodeArray)
- Makes the array with values to set the desired diodes depending on the desired color.
void RGBLed_SetColor(unsigned long * AdiodeArray)
- Uses marked array and functions for setting LED diode to a logic low or high state to set LED to the desired colour.
void RGBLed_SetDiode(char ANum, unsigned long AColor, unsigned long * AdiodeArray)
- Turns the determined LED diode (ANum) to the desired colour by using SetColor function.
void RGBLed_InitHW()
- Performs the hardware pin initialization.
void Delay_time()
- Determines the time delay value.
void FillScreen()
- Turns all LED diodes to the desired color.
Example Description
Code snippet - Turns all LED diodes (fills all screen, LED matrix) to different colours with the delay time of 50 milliseconds.
The full application code, and ready to use projects can be found on our page.
void applicationTask() { RGBLed_InitHW(); TempColor = 0x002F2F2F; // White FillScreen(); n=10; // 10*5ms = 50ms delay TempColor = 0x0000002F; // Blue color FillScreen(); n=10; TempColor = 0x00002F2F; // Bright blue color FillScreen(); n=10; TempColor = 0x00002F00; // Green colcor FillScreen(); n=10; TempColor = 0x002F2F00; // Yellow color back FillScreen(); }
4X4 RGB Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.