It is actually just a more compact way of writing code… at least that is all I use it for, particularly with my timer codes. I am sure there must be many more reasons for its use/benefits with actual real programers (AKA not me )
Basically this…
void setup() {
// setup stuff
// more setup stuff
// Timed Lambda Function - UpTime counter
timer.setInterval(1000L, []() { // Run every second
Blynk.virtualWrite(V0, millis() / 60000); // Display the UpTime in Minutes
}); // END Timer Function
}
…is just a ‘compact’ way of doing this…
void setup() {
// setup stuff
// more setup stuff
// Timed Lambda Function - UpTime counter
timer.setInterval(1000L, UpTime); // Run the function UpTime very second
}
void UpTime() {
Blynk.virtualWrite(V0, millis() / 60000); // Display the UpTime in Minutes
}