Smart Streetlight using Heltec LoRa V2

Good Day all!

I am trying to make a smart streetlight using heltec lora. But unfortunately heltec lora wont read any of my sensors. When i tried my sensor to my arduino uno, all my sensors works well. Kindly help me what went wrong please. Thank you so much!

What kind of sensors are you using and how many of them?
What pins do you have them connected to?
Are you reading the sensors using Analog/ADC or are they digital sensors?

Maybe post the code snippet of how you are reading the sensors.

What board are you using?
Keep in mind that some boards have a voltage divider on pin 13 AFAIK that is used to sense the battery voltage.

Pin 34 on some of them are used for one of the LORA pins LORA_DIO2 I think.
Pin 35 is also used by LORA_DI01.

On the Lora Shell pins 4, 2, 15, 12 should be fine for IO
Pins 37, 28, 39 can only do Input.

Hope that helps.

Im using Heltec LoRa v2. Any suggest what pin can i use for the input of my sensors and output for my LED

1 Like

I would try 37, 28 and 39. I think the LoRa V2 is the same as the Wireless Shell that I use in respect to the pinouts.

Keep in mind that those pins are Input Only so you can not use them as outputs,

1 Like

Sorry, that shold have been 37, 38 and 39. :slight_smile: cold and fat fingers!!

2 Likes

Thank you so much!!!

Good luck :slight_smile:
Also check the voltages of the devices you are connecting, make sure they are providing a voltage level in the correct range. Especially with the PIR.

Yes I will! Thank you! :slight_smile:

I know for sure pins 32, 36, 38, 39 all support Analog to Digital Conversion.
#include “Wire.h”
#include “Heltec.h”

#define adcA 32

void setup() {
pinMode(adcA, INPUT);

//other code
}
void loop() {
float a;
a = analogRead(adcA);

}