I’ve created a “Terminal Widget” to send a “Number” to the Particle Photon. So the photon sends the number back to Blynk for the “Gauge Widget” to display it.
Gauge widget displays numbers without errors, with just “/pin/”.
But with “/pin/ out of 100” (or) “/pin/ / 100”, gauge’s display behaves odd!
Sent 11 via Terminal - Image “1” looks good.
Sent 10 via Terminal - With Image “2”, please note the text " out of " is removed. And also note the last “zero” looking small.
Sent 2 via Terminal - Image “1” looks good.
Sent 1 via Terminal - With Image “2” the text " out of " is removed. And also note the last “two zeros” looking small.
@ilak2k I saw that you had created two topics on this same issue, as both had the same info, I deleted the older redundant one.
As for your issue, I see that the Gauge Widget now supports the same detail labeling as the Labeled Value Widget (@Dmitriy - but the Gauge Docs do not reflect this?).
I think that since the terminal sends out string data, it might not be converting correctly with the /pin/ variable and thus somehow conflicting with the text to the label.
The small characters are just due to automatic scaling, probably of the text portion of your label.
@Gunner Oh no! Did you read through the post? Even though screens are same. The one you deleted were showing issues with the Terminal Widget. This post shows the issues with the Gauge Widget… Please undelete it… Or, should I post it again?
Labeled Value Widget works fine without issues. It’s only the Gauge Widget that has this issue. I’ll post a screenshot with both Gauge and Labeled Value Widget in a minute
// This #include statement was automatically added by the Particle IDE.
#include <SparkCorePolledTimer.h>
// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>
#define BLYNK_PRINT Serial // Set serial output for debug prints
//#define BLYNK_DEBUG // Uncomment this to see detailed prints
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Your Auth Token";
WidgetTerminal terminal(V3);
char szMsg[256]; // buffer for all sorts of messages
BLYNK_WRITE(V3)
{
// if you type "Marco" into Terminal Widget - it will respond: "Polo:"
if (String("Marco") == param.asStr()) {
terminal.println("You said: 'Marco'");
terminal.println("I said: 'Polo'");
// terminal.println();
} else {
// Send it back
terminal.println("You said:");
terminal.println(param.asStr());
// terminal.println();
}
// Ensure everything is sent
terminal.flush();
Blynk.virtualWrite(V11, param.asStr());
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
for(int i=1;i<=25;i++)
{
terminal.println();
}
terminal.flush();
// 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();
}
void loop()
{
Blynk.run();
}
I’ve seen it…
Also tried “/pin./”, but same response…
I don’t think Text to Label will be an issue. Labeled Value widget works fine. Refer to the screenshots with both Gauge & Labeled Value widgets. Also, remember and note, there are issues only when displaying these values:
1
10
100
1000
and so on…
All other numbers display just fine…
No, it’s not! Automatic scaling with all Blynk widgets happens as a whole. It doesn’t happen for a portion of the content…
I’ve tried sending data as an integer, also with the same response: Blynk.virtualWrite(V11, param.asInt());
Sorry, a case of too many similar pictures and layout… and not enough differential clarity.
I have restored that topic, but can you perhaps crop your screenshots to remove extraneous parts of the image… particularly when so visually similar as another semi-related topic as this one (since I still suspect your issue here may be due to the data format coming from the terminal).
OK, now this comparison makes a case that there could be an issue in the (apparently recent) addition of detailed labeling to the Gauge Widget… you should have led with this
@Dmitriy - can you refer the correct developer to this topic to confirm. Thanks
PS Apparently it does in this case The question is whether it is done on purpose to account for the much smaller text space in a Gauge vs other displays (e.g. Keep the primary value /pin/ large and adjust any labeling to fit)
500 out of 100, is displayed properly and as you said, 500 is big and the rest looks small 1 out of 100, is displayed differently. Instead of “1” as big, here “11” is big and “00” looks small…
The first screen shot actually confirms my hypothesis… the 500 is the primary variable, related to the actual gauge position, and stays large for primary focus (I personally would be more upset if it also scaled down). The rest of the “support” labeling is automatically scaled, based on available space.
The question is why the second one truncates and mixes the variable and the labeling… the Developers will tell us I guess
Have you tried adjusting the MAX range down to a more realistic level as compared to your test samples?.. say MAX 255 or 1023
So while awaiting a Developer to weigh in, eventually… it is the weekend Can you post your latest code here… I would like to try to duplicate the issue myself, without assuming what sketch details you have changed. Thanks.
// This #include statement was automatically added by the Particle IDE.
#include <SparkCorePolledTimer.h>
// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>
#define BLYNK_PRINT Serial // Set serial output for debug prints
//#define BLYNK_DEBUG // Uncomment this to see detailed prints
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Your Auth Token";
WidgetTerminal terminal(V3);
char szMsg[256]; // buffer for all sorts of messages
BLYNK_WRITE(V3)
{
// if you type "Marco" into Terminal Widget - it will respond: "Polo:"
if (String("Marco") == param.asStr()) {
terminal.println("You said: 'Marco'");
terminal.println("I said: 'Polo'");
// terminal.println();
} else {
// Send it back
terminal.println("You said:");
terminal.println(param.asStr());
// terminal.println();
}
// Ensure everything is sent
terminal.flush();
Blynk.virtualWrite(V11, param.asInt());
Blynk.virtualWrite(V12, param.asInt());
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
for(int i=1;i<=25;i++)
{
terminal.println();
}
terminal.flush();
// 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();
}
void loop()
{
Blynk.run();
}
OK @BlynkAndroidDev Right off the bat I can confirm that there is an issue with the Gauge’s /pin/ variable received either as Integer or String, and from any source (tested with sketch supplied, slider and terminal).
It functions normally, until the first matching number, then it seems to truncate any preceding label text, displays the matched number along side the /pin/, then carries on as normal. What fun
And at risk of turning this topic into Pinterest here is more picture examples when /pin/ is processed as 0-5 with the numbers 1234 in the label.