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]
Rating:
Author: MIKROE
Last Updated: 2019-07-29
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: LED matrix
Downloaded: 5076 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.
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".
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 :
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 :
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 click, USB 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.