Hi. I use Blynk and the example of sending an email if I connect Gnd to pin 2. When the email is sent the application disconnects. What should I do so that it does not disconnect and I can send several emails?. My hardware is: Arduino Mega 256 y Shield Ethernet W5100
What do you see in your serial monitor?
Pete.
[0] Getting IP…
[5705] IP:192.168.0.6
[5706]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Mega
[5823] Connecting to blynk-cloud.com:80
[6371] Ready (ping: 182ms).
Button is pressed.
Butto
The Gmail notification is successful, but then the app Blynk says: Offline
Can you turn on timestamp in the serial monitor and repeat this please?
Pete.
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.6.1 on Arduino Mega
[5873] Connecting to blynk-cloud.com:80
[6253] Ready (ping: 140ms).
12:49:01.637 -> Button is pressed.
12:49:01.980 -> Button is pressed.
12:50:20.376 -> Bu
If I close the monitor and reopen it, the system returns to normal …
I think the issue is that you are getting is switch bounce from your switch on GPIO2
This is causing the limit of one email per 5 seconds to be exceeded.
Maybe add a debounce routine to the interrupt handler?
Pete.
Maybe add a debounce routine to the interrupt handler?: Can you help me how I do it and in which part of the code is it inserted?
This isn’t really a Blynk issue and there are lots of examples of interrupt debounce routines on the internet. Here is one example…
https://forum.arduino.cc/index.php?topic=45000.0
If you are using this example…
then it would go in the Interrupt Service Routine, which is called void emailOnButtonPress()
Pete.
Thank you for your collaboration