TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137096 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56122 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42073 times)
  6. FT800 Library (41384 times)
  7. GSM click (29113 times)
  8. mikroSDK (26561 times)
  9. PID Library (26489 times)
  10. microSD click (25487 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
mikroSDK Library

4x4 RGB click

Rating:

1

Author: MIKROE

Last Updated: 2019-07-29

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: LED matrix

Downloaded: 4667 times

Followed by: 2 users

License: MIT license  

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".

  • mikroSDK Library 2.0.0.0
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library 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

The library covers all the necessary functions to control 4x4 RGB click board.

Key functions:

  • void c4x4rgb_gpioDriverInit(T_PS2_P gpioObj) - Function initializes GPIO driver for the desired MIKROBUS1.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes GPIO, LOG structures.
  • Application Initialization - Initialization driver enables - GPIO.
  • Application Task - This is an example which demonstrates the use of 4x4 RGB Click board. This simple example shows all ten numbers in different colors on 4x4 RGB click. The 4x4 RGB click carries a matrix of 16 RGB LEDs and an MCP1826 low dropout regulator. These LEDs actually consist of three single-colored LEDs ( Red, Green and Blue ) in a single package. Various colors can be reproduced by mixing the intensity of each LED.
void applicationTask()
{
    mikrobus_logWrite( "   Set snake speed:  ", _LOG_LINE );
    mikrobus_logWrite( "  20 x 5 ms = 100 ms ", _LOG_LINE );
    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "      ~ Blue ~      ", _LOG_LINE );
    sSpeed = 20;
    tempColor = _C4X4RGB_COLOR_BLUE;
    c4x4rgb_snake();
    mikrobus_logWrite( "---------------------", _LOG_LINE );
    
    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "   ~ Light Blue ~    ", _LOG_LINE );
    tempColor = _C4X4RGB_COLOR_LIGHT_BLUE;
    c4x4rgb_snakeReturn();
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    mikrobus_logWrite( "   Set snake speed:  ", _LOG_LINE );
    mikrobus_logWrite( "  15 x 5 ms = 75 ms  ", _LOG_LINE );
    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "      ~ Green ~      ", _LOG_LINE );
    sSpeed = 15;
    tempColor = _C4X4RGB_COLOR_GREEN;
    c4x4rgb_snake();
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "     ~ Yellow ~      ", _LOG_LINE );
    tempColor = _C4X4RGB_COLOR_YELLOW;
    c4x4rgb_snakeReturn();
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    mikrobus_logWrite( "   Set snake speed:  ", _LOG_LINE );
    mikrobus_logWrite( "  10 x 5 ms = 50 ms  ", _LOG_LINE );
    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "       ~ Red ~       ", _LOG_LINE );
    sSpeed = 10;
    tempColor = _C4X4RGB_COLOR_RED;
    c4x4rgb_snake();
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "     ~ Purpule ~     ", _LOG_LINE );
    tempColor = _C4X4RGB_COLOR_PURPLE;
    c4x4rgb_snakeReturn();
    
    mikrobus_logWrite( "---------------------", _LOG_LINE );
    mikrobus_logWrite( " Fill Screen speed:  ", _LOG_LINE );
    mikrobus_logWrite( "  5 x 5 ms = 25 ms   ", _LOG_LINE );
    mikrobus_logWrite( "   Set diode color   ", _LOG_LINE );
    mikrobus_logWrite( "      ~ White ~      ", _LOG_LINE );
    sSpeed = 5;
    tempColor = _C4X4RGB_COLOR_WHITE;
    c4x4rgb_fillScreen();
    mikrobus_logWrite( "---------------------", _LOG_LINE ); 
}

Additional Functions :

  • void c4x4rgb_logicZero() - The function generic logic zero.
  • void c4x4rgb_resetDelay() - The function reset delay.
  • void c4x4rgb_initDiode( uint32_t aRGBColor, uint32_t *aDiodeArray ) - The function initialization RGB diode.
  • void c4x4rgb_setColor( uint32_t *aDiodeArray ) - The function set the color of the diodes.
  • void c4x4rgb_setDiode( int8_t aNum, uint32_t aColor, uint32_t *aDiodeArray ) - The function turn on aNum number of diode with the desired color.
  • void c4x4rgb_delayTime() - The function set delay time.
  • void c4x4rgb_snake() - "Snake" animation function.
  • void c4x4rgb_snakeReturn() - Reverse "Snake" animation function.
  • void c4x4rgb_fillScreen() - The function fill screen.

Other mikroE Libraries used in the example:

  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

2x30W Amp click

5

2x30W Amp click is a class-D audio amplifier with a tremendous output power, considering its size and lack of huge heatsinks, usually associated with the audio amplifiers.

[Learn More]

RF Meter click

1

RF Meter click is a radio frequency power measurement device covering a frequency span from 1 MHz to 8 GHz over a 60 dB range. An external antenna acquires the signal, which is then processed by the AD8318 logarithmic detector. For communicating with the target board MCU, the mikroBUS SPI interface is used with additional TEMP OUT pin.

[Learn More]

Charger 9 click

0

Charger 9 click is a Li-Ion (Li+, Li-Po) battery charger, capable of charging one, two or three battery cells.

[Learn More]