Can Blynk run 2 LCD modubles in the app at once?

Hi guys a few basic questions that I was unable to find the anwser to in the docs or forumn.

  1. Can i add a second LCD to my app? and if so how do i code that

    lcd.clear(); //Use it to clear the LCD Widget
    lcd.print(0,0,(“Distance (cm):”));

  2. Follow up is it possible to add strings and variables to one line 1 of the lcd to save space? Is there an example for this? What i tried is wrong

    lcd.print(0,0,(("Distance(cm): ")+uS));

  3. Example of how to format and parse millis() to show on M/: Label in this format hh:mm:ss .

  4. Is it possible to add multiple wifi credentials to the code so it can connect to different wifif connections?

thanks guys once i sort this out I might need to get a lot of new energy :slight_smile:

@Blynk182 you will have something like this in your sketch:

WidgetLCD lcd(V1);

This means create an “object” called lcd and atatch it to V1.

So for 2 LCD’s you should perhaps make them like this:

WidgetLCD lcd1(V1);
WidgetLCD lcd2(V2);

You then reference lcd1 or lcd2 throughout your sketch.

1 Like

For 2 I don’t think it is possible in a single step.

You would basically do the String manipulation (join, cut, trim etc) before sending the final one line to the LCD.

For 3 you should make use of the Time library. It could be done with millis() but most of the formatting is already done for you with the Time library.

For 4 you would have to make the WiFi connection before connecting to the Blynk server so instead of:

Blynk.begin(auth, ssid, pwd);

You have:


There are several ways to store multiple WiFi credentials and one way would be in the relatively small EEPROM. Try first for 5 seconds, try second for 5 seconds etc. There are probably some SPIFF procedures you could use for this.

You can have variable WiFi credentials with WiFI Manager, you basically change them on the fly via the browser on your Smartphone. One other tip is to make the WiFI credentials the same for as many places as possible.

So if the router at mother’s house is:

ssid "TPlinkxxx"
pwd "abcdefghij"

Change your router details to the same, and that of your brother, sister, friend and Smartphone AP etc
Not ideal but works quite well amongst friends and family.

1 Like