Testing and Troubleshooting

Testing IoT devices, especially ones with such aggressive sleep cycles, can be a pain. Here are some easy ways to test the various operations of the device.


Using the flag in the firmware, set the device to serial output. Use a serial monitor to watch sensor readings and make sure they are all accurate.

Ultrasonic Issues

If the ultrasonic sensor consistently reports 0, this is probably due to a faulty connection. Readings that hover around a specific value, but do not reflect the actual range may come from a power supply issue. Try supplying power to the sensor directly to see if the issue is resolved. If you notice readings become unstable after some range, this is probably a power supply issue as well. Make sure the voltage you are supplying is what it is designed for. As a last resort, try adjusting the trim inductor on the sensor.

Full Operation

We recommend running the device at home for a few days before deploying it. From this, you may find problems that only occur intermittently or find that your device is drawing more power than you are expecting. Run the device with the standard flag.

If you are not set up with a monitoring solution yet, IFTTT and Google Sheets is probably the easiest way to log the data for testing. Just set up a task that adds a row to a Google Sheet each time a Measurement event is published by your Particle device.