Hi All,
First time poster, long time listener here. I am pretty stumped on this one.
I am using an Ethernet Shield to send a UDP command to another device on my LAN when a button is pushed.
https://www.sparkfun.com/products/11166
I have 3 Arduinos running the exact same code (except for adjustments to network settings per Arduino).
Only 1 Arduino is giving me trouble. The other two are working great with the same code.
Occasionally, this Arduino will send dozens of UDP packets as fast as possible - flooding the network with traffic for a few seconds. See my wireshark screenshots attached for "normal" behavior when the button pushed rapidly, versus "error" behavior.
Troubleshooting steps I've done so far.
-Implemented button debouncing per Arduino.CC example.
-Added a counter to increment whenever my msg.send(Udp) command was executed, to see if I could log the dozens of dozens of uncommanded UDP packets. But the counter did not increment faster than my actual button pushes.
-Added a 500ms delay to my send UDP function, so it would not be possible to rapidly send packets. This did not work either - was still able to see packet spam on occasion.
So I'm wondering.
Is this a hardware issue with this Ethernet Shield in Particular?
Is there an issue with the OSCMessage.h or EthernetUdp.h libraries?
Something else I'm missing???
I've attached a simplified copy of my program for review, as well.
For_Network_Debug.ino (7.31 KB)