Add details :
• Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
• Smartphone OS (iOS or Android) + version
• Blynk server or local server
• Blynk Library version
• Add your sketch code. Code should be formatted as example below.
Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.
i want to interface lcd widget on my blynk app with raspberry pi using node red i want to print ultrasonic sensor data on lcd widhet i am using pisrf extention on node red
I’m not familiar with pisrf, but provided it can spit out the ultrasonic data in text or numeric format then it’s very easy to push it out to the LCD widget.
Personally, I tend to use labelled display widgets as they look neater (in my opinion) and they are easier to work with.
If you’re using the LCD widget then ensure that it’s set to Advanced mode in the app.
In Node-Red use the Blynk LCD node and read through the information tab to see how to send the data to the widget.
If you’re wanting to do two lines of text (the only reason I can think of to use the LCD widget) then you’ll need to send this as msg.text and msg.text1
If you’ve previously written a long piece of data to the LCD then writing a short piece of data will leave the longer characters in place. For example, if you write “1.2345” to the widget then write “3.7” to the widget, what will actually be displayed is “3.7345”. You can get around this by writing a longer blank string first, or doing a msg.clear with the value of true.
Note that setting msg.clear to true will clear the whole display, not just one line.
could you please send me flow to implement lcd as i am passing msg.text in function input from inject node but it is showing error while debugging.please help i just need to know how to use lcd widget
As I said, I have no experience of pisrf.
If you can show me some examples of a flow that gets data from pisrf and displays it in a debug node, and what that debug screen shows, then I might be able to help.
Okay, I’ve put together a simple flow that simulates the data coming out of your Pi SRF node and re-formats it then outputs the results to the LCD.
The flow looks like this:
var dist_cm = msg.payload; // Get the value in CM from the message payload
var dist_in = dist_cm/2.54; // Calculate what this means in inches
dist_in=dist_in.toFixed(2); // Round the inches to 2 decimal places
msg.clear=true; // Clear the old data from the LCD
msg.text=dist_cm + " Cm"; // The Cm value to the top row
msg.text1=dist_in + " Inches"; // The Inches value to the bottom row
return msg; // Output the results