# Basic where to start debugging

**URL:** <https://community.particle.io/t/basic-where-to-start-debugging/44922>\
**Category:** Troubleshooting\
**Created:** [November 1, 2018, 5:14pm UTC](https://community.particle.io/t/basic-where-to-start-debugging/44922 "2018-11-01T17:14:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [November 2, 2018, 2:30pm UTC](https://community.particle.io/t/basic-where-to-start-debugging/44922/4 "2018-11-02T14:30:04Z")

</div>

@Condoman, posting a picture of your wiring might be helpful. You can find other posts from other members regarding the SR04 sensor which may be helpful.

> [@JSN-SR04 ultrasonic sensor](https://community.particle.io/t/jsn-sr04-ultrasonic-sensor/34161):
>
> I have a JSN-SR04 sensor I just purchased that I suspect is bad. Can anyone tell me if it is the same as the HC-SR04 except they are waterproof? I am able to get firmware to work with the HC-SR04 but not the JSN-SR04.

> [@Keep on getting -1 as a reading when trying to send info from an SR04 sensor to thingspeak](https://community.particle.io/t/keep-on-getting-1-as-a-reading-when-trying-to-send-info-from-an-sr04-sensor-to-thingspeak/26354):
>
> so i am having trouble with the ultra sonic sensor SR04 because when i try to send thingspeak data it only gets -1. im not sure why so here is my code: // This #include statement was automatically added by the Particle IDE. #include "HC\_SR04/HC\_SR04.h" int distance = 0; int cm; int trigPin = D2; int echoPin = D6; HC\_SR04 rangefinder = HC\_SR04(trigPin, echoPin); void setup() { } void loop() { distance = rangefinder.getDistanceCM(); cm = distance; Particle.publish("ultra\_senso…

---

_[View the full topic](https://community.particle.io/t/basic-where-to-start-debugging/44922)._
