Issue with Blynk app Value Display

Hi All,
I need some help please as I cannot work out where my error is.
I have an Arduino Mega board with onboard WIFI utilising the ESP82266 chip.
I am running Blynk on my Android Samsung S9.

Blynk connects and talks to the Arduino OK. I am using the Blynk server.
For security reasons I have deleted the auth code, SSID and password from the code below.

My issue is with the void sendUptime() function. It is not writing the slidervalue back to the Blynk App?
I am not sure why.
This is the code: Blynk.virtualWrite(V3, SliderValue); that should write the slider value back to the Blynk app.

I tried initially with the sendUptime() function within the void setup() function as per the Blynk example sketch. I read somewhere this was incorrect and so I moved the sendUptime() function to outside of the void setup() function and void loop() function, still no good.

You will notice I have placed Blynk.virtualWrite(V3, SliderValue); into the void loop(), just to test it works from here, and it does.
But why does it not work from within the void sendUptime() function.

[Unformatted code removed by moderator]

Hi All,
Worked it out. I forgot to place the function into the void loop().
Works fine now.

@RobCb please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:


Hi Peter,
Thanks for the advice. I could not find the pencil (edit icon). I did not realise you deleted the code out of my post.
I’m thinking it may have been better if you corrected the code as per your suggestion instead of deleting it all together and then advised me via the message. I still would have learnt the error of my way and then at least the thread I posted would have remained in tact for others to read fully.
Anyway, thank you.

As with all community members who don’t follow the posting rules (which i the proforma text that appears when you create a new post), I asked you to fix the formatting of your code then set a 24 hour timer to remind me to go and check that this had been done. As it hadn’t, your unformatted code was removed.

The posting rules actually say…

If you don’t format your code, your topic can be deleted by moderators.

but I think deleting the entire topic is a little heavy-handed, so I just remove the unformatted code and add a note to that effect.

All that achieves is to reinforce the behaviour of posting unformatted code. I didn’t sign-up to be a moderator to spend my time adding triple backticks to posts where members don’t follow the rules, so I prefer to remind/educate forum members what is expected/required when they post code to the forum.


Is there any reason why files cannot be uploaded?

That’s the way that the Discourse software that is used to host the forum. has been configured. presumably for security reasons.