Use your forum account to login.

LOGIN

TOP Contributors

  1. MikroElektronika Team (734 codes)
  2. Shawon Shahryiar (262 codes)
  3. Alcides Ramos Zambrano (170 codes)
  4. S P (67 codes)
  5. Dany (66 codes)
  6. MikroBUS.NET Team (35 codes)
  7. NART SCHINACKOW (34 codes)
  8. Armstrong Subero (26 codes)
  9. Roman Toropov (26 codes)
  10. FOURNET Olivier (25 codes)

Most Downloaded

  1. Timer Calculator (94270 times)
  2. FAT32 Library (49333 times)
  3. Network Ethernet Library (44573 times)
  4. USB Device Library (34714 times)
  5. Network WiFi Library (31929 times)
  6. FT800 Library (27696 times)
  7. GSM click (21623 times)
  8. PID Library (21439 times)
  9. microSD click - Example (17683 times)
  10. GSM 2 click (14639 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: 1000 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

M-BUS RF click

1

M-BUS RF click is a mikroBUS add-on board with a Telit ME70-169 RF wireless module. The radio operates at the unlicensed ISM frequency band between 169.400 and 169.475 MHz.

[Learn More]

ProxFusion click

5

ProxFusion click is a multifunctional capacitive and Hall-effect sensor device. This click can detect touch by using two onboard sensor pads, and it can sense a rotation angle of a magnetic field, parallel with the surface of the click board.

[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]