top of page


Updated: Mar 8

Received a really helpful and supportive email from Tom this morning about debugging my device.

Some pieces of advice that I've acted on so far:

1. Electrostatic Discharge Tom suspected that my Arduino was experiencing electrostatic discharge with some bare pins. I was trying to be stupidly clever and made this little proto board that only connected to half the Arduino because I only needed access to pins on one side.

I decided to play it safe and quickly put together a new protoboard that is more stable

Actually I accidentally soldered wires to the REF pin instead of A0, but was able to fix that pretty easily.

2. Shiftr Desktop

I was having problems connecting to Shiftr last week, and thus, wasn't receiving enough messages to be able to write a nice little script for my dashboard (link here). Tom suggested I try the Shiftr Desktop broker, and I forgot that existed, and was able to connect really easily!

Hmm... I walked away and it disconnected. Time to jump to suggestion #3: Scan Networks.

3. Scan Networks Lately the sandbox network at school has been unreliable/busy.

Running the WiFiNINA Scan Networks example shows that sandbox370 at my desk has a network strength of around -64dB, which seems adequate for this project. Other networks in this area go up to -60dB (NYU-legacy).

4. Arduino Resetting While I don't believe my Arduino is resetting, I ran Tom's reset Serial print sketch to see if the Arduino would reset over a longer period of time.

Last week I updated my sensor sketch to count the number of reactions over time. The number increases in value, and should reset to 0 if it resets. I've never encountered a '0 people have voted yes!' reading, so if it is resetting, it's unable to reconnect to the networks to report back. Right now, I'm 5 minutes in, and it has behaved so far. Will check back in a little bit to see if anything has changed.

void setup() {
  if (!Serial) delay(3000);

void loop() {

Update: 15+ minutes later, and no reset so far. Will walk away from computer and come back to see if anything changed. Maybe my Arduino acts up when it's left alone.

Update #2: Made a salad and came back. No change. This does not seem to be the issue.

5. Power Does USB power from the computer dip over time if, for example, the computer goes to sleep? I wonder if that was affecting my connectivity. However, if I return to computer and assume power jumps back to normal, shouldn't the Arduino be able to connect back to the network?

The biggest problem is connecting back to the network and MQTT over time. The device has been able to successfully reconnect in the past. Now I just have to figure out why and recreate that scenario.

Other experiments

Back to Mosquitto

I touched in with Ijon today who agreed that Shiftr was less reliable than Mosquitto. I tried my Mosquitto connection again to see how it lasted over time. The initial connection was immediately successful, and after about 15 minutes, my device is still connected. Update: It disconnected but did not trigger the reconnecting cycle. Interesting.

Frequency of Messages

I wonder whether the infrequency of my messages is causing the Arduino to "go to sleep," as if it reached an idle status and disconnected from MQTT. So maybe I need to keep the connection 'alive' by sending it data consistently over time.

Update: I am getting silently disconnected from Mosquitto in a way that my Arduino isn't registering (?) Messages stop sending through Mosquitto but the reconnecting cycle isn't triggering. Weird.

Update # 2:

HAHA as soon as I wrote that ^ and triggered the vote a couple more times, the reconnecting script activated and successfully reconnected to Mosquitto. The counter was still intact and maintained the value, so I didn't lose any data. A win, I think. However, at some point the 5 second message stopped sending last time. I wonder if that had to do with power.

3 views0 comments

Recent Posts

See All
bottom of page