I’ve searched and can’t seem to figure out how to pass information from my variable: GarageOpenMinutes in the body of my email. I have the Blynk.notify working correctly, but can’t figure out the syntax for Blynk.email. Basically, I’d like to somehow send the number stored in GarageOpenMinutes to the body of an email.
One of the strings I’ve tried is below. The body of the text in the email is “rage open for:” Which I believe has something to do with I’m asking to be notified after 2 minutes if it is open. It seems to be deleting the “Ga” from “Garage” when 2 minutes pass instead of showing the number “2”.
Blynk.notify(String("Garage door is open for: ") + GarageOpenMinutes + String(" minutes"));
Blynk.email("MyEmail@gmail.com", "Garage Open", "Garage open for: ") + GarageOpenMinutes (" minutes"); // send email
Depends, if you set it outside any functions it will be a Global Variable which you can use anywhere, but, it will take more memory. It’s not very likely to matter with small things such as these projects, but it could be an issue with larger projectes.