Use your forum account to login.

LOGIN

TOP Contributors

  1. MikroElektronika Team (682 codes)
  2. Shawon Shahryiar (258 codes)
  3. Alcides Ramos Zambrano (168 codes)
  4. Dany (66 codes)
  5. S P (64 codes)
  6. MikroBUS.NET Team (35 codes)
  7. NART SCHINACKOW (34 codes)
  8. Roman Toropov (26 codes)
  9. FOURNET Olivier (25 codes)
  10. Alberto Trasimeni (25 codes)

Most Downloaded

  1. Timer Calculator (92032 times)
  2. FAT32 Library (47984 times)
  3. Network Ethernet Library (43864 times)
  4. USB Device Library (34093 times)
  5. Network WiFi Library (31535 times)
  6. FT800 Library (27006 times)
  7. GSM click (21314 times)
  8. PID Library (21176 times)
  9. microSD click - Example (17470 times)
  10. GSM 2 click (14332 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

4x4 RGB click

Rating:

1

Author: MikroElektronika Team

Last Updated: 2015-07-31

Category: Graphics & LCD

Downloaded: 962 times

Followed by: 2 users

4x4 RGB click carries a matrix of 16 RGB LEDs and a MCP1826 low dropout regulator. The LED matrix is connected to the target board microcontroller through the mikroBUS RST pin. The board uses either a 3.3V or 5V power supply.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "4x4 RGB click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "4x4 RGB click" changes.

Do you want to report abuse regarding "4x4 RGB click".

  • Information
  • Comments (1)

Example Blog

4x4 RGB click

4x4 RGB click

Native view of the 4x4 RGB click board.

View full image
4x4 RGB click

4x4 RGB click

Front and back view of the 4x4 RGB click board.

View full image

Library Description

Library performs control of the LED color and light efects. Library uses LED color control to perform some  applications, like snake application in different colors and screen light also in different colors. 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 inludes 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 maked array and functions for setting LED diode to logic low or high state to set LED to the desired color.

void RGBLed_SetDiode(char ANum, unsigned long AColor, unsigned long * AdiodeArray) - Turns the determined LED diode (ANum) to the desired color 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.

Examples Description

Code snippet - Turns all LED diodes (fills all screen, LED matrix) to different colors with the delay time of 50 miliseconds.

The full application code, and ready to use projects can be found on our LibStock 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 Demo

Demonstration of using 4x4 RGB Click.

Watch on YouTube

ALSO FROM THIS AUTHOR

10DOF Click Library

3

10DOF click board carries two modules from Bosch: BNO055, a 9-axis absolute orientation sensor and BMP180, a digital pressure sensor. 10DOF click communicates with the target board MCU through the mikroBUS I2C interface (SCL, SDA), with additional functionality provided by INT and RST pins. Designed to use a 3.3V power supply only.

[Learn More]

Accel 2 click

5

Accel 2 click carries ST’s LIS3DSH IC, a low-power factory-calibrated three-axis accelerometer which embeds a FIFO buffer and two programmable state machines. The board communicates with the target board MCU through either SPI (CS#, SCK, SDO, SDI) or I2C (SCL, SDA) interfaces.

[Learn More]

Clock Gen 2 click

5

Clock Gen 2 click is an accurate square wave generator that can generate a clock signal in the range from 260kHz to 66.6MHz.

[Learn More]