BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Can blynk control RGB LED display?

Hi good all friend can blynk work with RGB led display? I have project make information display board and we can control any information to display using blynk app…any sample code i can refer?..tq

plan using outdoor RGB led displayor dot matrix led display with arduino mega and ESP8266 or dot matrix led display

You will have to find and use whatever libraries and examples there are for those types of displays… that will be non Blynk related.

But once that works, you should be able to easily supply string info from the Terminal widget, assuming that is what these boards are to display.

if imagery, then you may have to program pre-done array info and use something like the Menu Widget to pick and chose from.

ok thanks friend…
let me test coding for RGB led display make sure it work first…later i try connect to BLYNK using Terminal Widget

This is possible.

I can recommend a starting point for you. Load up my Blynk LED Controller project, get it working and making cool colours on the panel, then go to the FastLED homepage and read about using matrix and typing text. They have a whole section.

Put that code in to mine and you should be good to go.

1 Like

ok thanks…friend…but my project to control text on RGB 32x64 matrix display…
but i can get some input from this video…thanks

Friend any example for terminal function can i follow…i already done coding for RGB led matrix display and i work fine…now i try connect this RGB led coding with terminal function…i use arduino mega and esp8266 wifi module


hi friend,
i still confuse how to use terminal widget to sent my text to my hardware (arduino mega + Esp8266) and display at RGB LED 34x64 matrix display.
i already test my coding RGB LED 34x64 matrix display it work fine.
now time to use or combine coding Terminal Widget and RGB LED 34x64 matrix display.
so i can sent my text from Blynk app to my RGB led display…

you have any idea or example to i follow?

thanks

So you can enter a string of text and it will display it? If so, then use terminal Widget to supply the text string.

http://docs.blynk.cc/#widgets-displays-terminal

https://examples.blynk.cc/?board=Arduino%20Mega%202560&shield=ESP8266%20WiFi%20Shield&example=Widgets%2FTerminal

Ok…i alredy follow terminal example and so far i still blur about this…let me try until i give up hahaha…
Thanks friend

Paste your code here… easier for us to assist that way.

After pasting it, format it as indicated for proper viewing…

Blynk - FTFC

here my coding for RGB LED MATRIX DISPLAY
thanks friend for helping

// scrolltext demo for Adafruit RGBmatrixPanel library.
// Demonstrates double-buffered animation on our 16x32 RGB LED matrix:
// http://www.adafruit.com/products/420

// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon
// for Adafruit Industries.
// BSD license, all text above must be included in any redistribution.

#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library

// Similar to F(), but for PROGMEM string pointers rather than literals
#define F2(progmem_ptr) (const __FlashStringHelper *)progmem_ptr


#define OE   9
#define LAT 10
#define CLK 11
#define A   A0
#define B   A1
#define C   A2
#define D   A3
// Last parameter = 'true' enables double-buffering, for flicker-free,
// buttery smooth animation.  Note that NOTHING WILL SHOW ON THE DISPLAY
// until the first call to swapBuffers().  This is normal.

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, true, 64); //32X64
//RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true); // 16X32

// Double-buffered mode consumes nearly all the RAM available on the
// Arduino Uno -- only a handful of free bytes remain.  Even the
// following string needs to go in PROGMEM:

const char str[] PROGMEM = "TESTING 32X64 RGB LED Matrix 1234567890&*()1234567890";
const char str1[] PROGMEM = "HELLO";
int    textX   = matrix.width(),
       textMin = sizeof(str) * -12, // CONTROL NO OF TEXT -12 = UNLIMITED
       hue     = 0;
int8_t ball[3][4] = {
  {  3,  0,  1,  1 }, // Initial X,Y pos & velocity for 3 bouncy balls
  { 17, 15,  1, -1 },
  { 27,  4, -1,  1 }
};
static const uint16_t PROGMEM ballcolor[3] = {
  0x0080, // Green=1
  0x0002, // Blue=1
  0x1000  // Red=1
};

void setup() {
  matrix.begin();
  matrix.setTextWrap(false); // Allow text to run off right edge , false=LEFT TO RIGHT 1 LINE , TRUE=BOTTOM TO UP AND RUN TO RIGHT
  matrix.setTextSize(1); // SIZE OF TEXT =1 SMALL , 2/3/4/5 BIG
}

void loop() {
  byte i;

  // Clear background
  matrix.fillScreen(0);

  // Bounce three balls around
  for(i=0; i<3; i++) {
    // Draw 'ball'
    matrix.fillCircle(ball[i][0], ball[i][1], 5, pgm_read_word(&ballcolor[i]));
    // Update X, Y position
    ball[i][0] += ball[i][2];
    ball[i][1] += ball[i][3];
    // Bounce off edges
    if((ball[i][0] == 0) || (ball[i][0] == (matrix.width() - 1)))
      ball[i][2] *= -1;
    if((ball[i][1] == 0) || (ball[i][1] == (matrix.height() - 1)))
      ball[i][3] *= -1;
  }

  // Draw big scrolly text on top
   matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true)); // MULTICOLOR
  //matrix.setTextColor(matrix.Color333(7,7,7)); //SINGLE COLOR
  matrix.setCursor(textX, 1);
  matrix.print(F2(str)); // TEXT LINE 1
  
  matrix.setCursor(textX, 8);
  matrix.print(F2(str1)); // TEXT LINE 2

  // Move text left (w/wrap), increase hue
  if((--textX) < textMin) textX = matrix.width();       //textMin
  hue += 7;                                           // CONTROL COLOR CHANGE SPEED
  if(hue >= 1536) hue -= 1536;                         //CONTROL COLOR CHANGE SPEED 

  // Update display
  matrix.swapBuffers(false);
}

With Blynk sketches it is best to only have the bare basics in the void loop(). So to start off you would need to move all of the current contents of your void loop() into a another void function and call it with a timer.

http://docs.blynk.cc/#blynk-firmware-blynktimer

For example:

BlynkTimer is the same as the widely used SimpleTimer library, in that it works more elegantly than manually manipulating millis() and much better for Blynk then delay(). Also, it is NOT dependent on a connection to a Blynk Server.

A typical Interval Timer layout includes a definition, timer setup (pointing to a function) and a timer call in the void loop():

BlynkTimer Timer; // Sets up a timer object named Timer (could be any name)

Timer.setInterval(250L, MatrixFunction);  // Goes in Setup() and will call the void MatrixFunction() every 250 milis (1/4 second - adjust to your needs).  Blynk Timer allows up to 16 of these same object named timers pointing to differing functions

void MatrixFunction() 
{
// Put all your matrix stuff here
}

void loop()
{
Blynk.run();
Timer.run();  // This goes in the void loop() so the BlynkTimer library can run.
}

If you want to test your existing sketch before trying to Blynkify it, use the SimpleTimer library, then you can test this all without any other Blynk libraries… just load the SimpleTimer Library, change BlynkTimer Timer; to SimpleTimer Timer; and remove Blynk.run(); from the main loop.

Or you can jump in and add the Blynk libraries and use BlynkTimer… operates the same.

Then once you have that figured out… you can see about adding in a terminal function to replace your pre-defined strings.

Possibly something like this?? I don’t have that hardware so you need to do all the experimenting :wink:

// You can send commands from Terminal to your hardware. Just use
// the same Virtual Pin as your Terminal Widget
BLYNK_WRITE(V1)
{
  // In the terminal Widget (on V1) on your App, you type in your text and press enter 
  const char str[] = param.asStr()  // Not sure if you need cost char or just char... or something else... try and test.
  matrix.setCursor(textX, 1);
  matrix.print(F2(str)); // TEXT LINE 1
}

ok thanks friend for this explanation.
i try to figured out how to do this…also need more time to understand how to use “SimpleTimer”.
my first understanding simpleTimer like normal timer or delay function…hahaha…

hi friend it possible i use terminal function to sent text from my smartphone (blynk app ) to RGB LED display? .i mean what i type at my terminal blynk it show at RGB led display ?

Sure. Just take the terminal input, format it as sized Strings for the LCD line and character size and print it to the LCD wherever you desire.

No different the getting text from the IDE Serial monitor or from other text & sensor output. But that is all just learning how to code for that… Not a Blynk issue, Google for examples.

ok thanks Gunner…let me try and test…

hi friends…
i try make simple terminal project using i2c LCD display 16x2 just for testing…
now i able to sent any text and display at lcd display.
i just edit from example terminal widget + i2c lcd display.
but how to control text length? i saw command terminal.write(param.getBuffer(), param.getLength());
i think this is function to control or get text length but how to use that?..

here my coding

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
LiquidCrystal_I2C lcd(0x3F,16,2);

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxx";
char ssid[] = "xxxxxx"; //wifi id change here
char pass[] = "xxxxxxx"; // wifi password change here
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600 // 115200

ESP8266 wifi(&EspSerial);
// Attach virtual serial terminal to Virtual Pin V1
WidgetTerminal terminal(V1);
BlynkTimer timer;

// You can send commands from Terminal to your hardware. Just use
// the same Virtual Pin as your Terminal Widget
BLYNK_WRITE(V1)
{

   String() == param.asStr();
   
    terminal.println(param.asStr()) ;
   terminal.write(param.getBuffer(), param.getLength());
    terminal.println();
    lcd.init();
  
  // Print a message to the LCD.
    lcd.backlight();
    lcd.clear();
    lcd.print(param.asStr()); 

    terminal.flush();
  }

  void scroll()
  {
    for (int positionCounter = 0; positionCounter < 30; positionCounter++) {
    // scroll one position left:
    lcd.scrollDisplayLeft();
    // wait a bit:
    delay(100);
  }
 // for (int positionCounter = 0; positionCounter < 30; positionCounter++) {
    // scroll one position right:
 //   lcd.scrollDisplayRight();
    // wait a bit:
 //   delay(100);
 // } 
  delay(2000);
  }

void setup()
{
   //Debug console
  Serial.begin(9600);
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
  
   // This will print Blynk Software version to the Terminal Widget when
  // your hardware gets connected to Blynk Server
  terminal.println(F("Blynk v" BLYNK_VERSION ": Device started"));
  terminal.println(F("-------------"));
  terminal.println(F("Type 'Marco' and get a reply, or type"));
  terminal.println(F("anything else and get it printed back."));
  terminal.flush();
  timer.setInterval(100L, scroll);
}

void loop()
{
  Blynk.run();
 timer.run();
}