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 (137081 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56094 times)
  4. USB Device Library (46413 times)
  5. Network WiFi Library (42032 times)
  6. FT800 Library (41377 times)
  7. GSM click (29109 times)
  8. mikroSDK (26555 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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: 4647 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

Charger 8 click

0

Charger 8 Click is an intelligent Li-Ion battery charger, system power manager, and a battery fuel gauge Click board™.

[Learn More]

OOK TX click

5

OOK TX click is a simple wireless transmitter that operates at the frequency of 433MHz (sub-GHz). This device allows realization of a simple, low-speed wireless ad hoc communication network between a transmitter and compatible receiver, such as the OOK RX click.

[Learn More]

BLE P Click - Android Application

0

Explore the possibilities of BLE P click - the add-on board for adding a Bluetooth Low Energy peripheral device to your embedded design. You can use this application as a starting point for developing your own apps. Or you can just pair it with an EasyMX PRO for STM32 development system and tinker with various PORTS and LEDs.

[Learn More]