first is assignment, the latter comparison operator. Read about them them here: https://www.arduino.cc/en/Reference/HomePage
That will not work in the way I think you think it will work
There is different syntax between Arithmetic/Assignment Operator ( = ) and Comparison Operator ( == )
example:
if (a == b) // Use of the DOUBLE == COMPARES If variable a is the same as variable b...
{
then c = 1 // ...and if it is, the SINGLE = ASSIGNS variable c the value of 1.
}
else c = 0 // If variable a is not the same as variable b, then variable c is assigned the value of 0.
}
EDIT @marvin7 - I don’t know how I missed your comment… I know I am slow typer, but 13min slow?? Your answer was short and sweet = better
Yup! Happened to me lately, now your turn
OK
but this returns me values from Blynk Slider the correct place in the calculation program and then returning to Blynk lcd
How do I use this with LCD Advanced Mode
Formatting options Let’s assume, your sensor sends number 12.6789 to Blynk application. Next formatting options supported: /pin/ - displays the value without formatting (12.6789) /pin./ - displays the value without decimal part (13) /pin.#/ - displays the value with 1 decimal digit (12.7) /pin.##/ - displays the value with two decimal places (12.68)
Check out this link where I answer that question with a short example:
so this is not possible
What is not possible…? Sorry guess I didn’t understand the original question.
Is this possible with LCD Advanced Mode ?
displays the value with 1 decimal digit (12.7)
the formatting strings (#.##) are for simple mode. In advanced mode all formatting is done in device’s code. There is no user interface element in app to do it in advanced mode, so it’s straightforward that it cannot be done this way. But formatting in device is as simple as using function
Str = String(float_value,decimal_points)
Analyze this piece of code:
String V_LCD_row0 = "IN: ";
if (Tc_in >= 0) V_LCD_row0 += " ";
V_LCD_row0 += String(Tc_in, 1);
V_LCD_row0 += rh_str;
V_LCD_row0 += String(Rh_in, 0);
V_LCD_row0 += "%";
String V_LCD_row1 = "OUT:";
if (Tc_out >= 0) V_LCD_row1 += " ";
V_LCD_row1 += String(Tc_out, 1);
V_LCD_row1 += rh_str;
V_LCD_row1 += String(Rh_out, 0);
V_LCD_row1 += "%";
Virtual_lcd.print(0, 0, V_LCD_row0);
Virtual_lcd.print(0, 1, V_LCD_row1);
Also strongly suggesting digging a little into basics at given Arduino reference page, where String()
function is explained among other useful stuff
@marvin7
this comes to me slowly with me and is always more to learn and understand this
Has just been here for 10 days and is going on the course after 20 days, I am now satisfied what I’ve done with your help here
The next step is to write to explain; what’s what in the code, so to bring it together and finish this connect in offroad jeep to see functionality
But thanks for your help
This sounds like a very big endeavor to start with, but I see that you are definitely working hard on it… However, I would recommend that on your first trip, you bring along a manual tire pump, just in case
it would still be great to get some help or good eyes to see how I fix this, you are so cool to see immediately what you can do[quote=“Eyberg, post:59, topic:12034”]
Found a solution to this problem Before
Eyberg:
setPoint = newSetPoint;
= missing or ?Now and works
Eyberg:
setPoint == newSetPoint;
[/quote]
he, he… good point, @Gunner! But seriously speaking, if @Eyberg will make it to build on his own, then he will definitely will know what wires to short for emergency inflating!
And more importantly… when to let go of said wires
you would love to come along for the ride on a glacier like this last year
You should see lines of approximately the tires are 38 "but these are manual equipment controlled by valves that are manual
https://www.youtube.com/watch?v=PyYJYC41QUc&t=8s
Yeah… a free and open world, hard to find on mainland Europe… If one day I will be bored with spending summer on the beach, perhaps will choose Iceland to visit…(or emigrate )
Not always safe, though:
It’s true
I disable this out and then it works
setPoint = newSetPoint;
To be honest, I do not know what works and what not.
To summarise:
- You plan to keep the pot for manual setting?
- if not, then you don’t need the whole function, as the setPoint var can be set (only) by means of slider from APP, and this is done by VIRTUAL_WRITE function, presented in prev. post.
- If Yes, then the whole thing will be a bit more complicated (but not that much) to keep in sync both settings (although the pot can be used then, it is not recommended)
So?
Ok ?