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. Here i attached my codes. Kindly help me what went wrong in my codes please. Thank you so much!

Hi!

Could you link to the exact board you are talking about? There's so many manufacturers and designs, and little differences can be just enough to cause problems.

Cheers,
Kari

Hi!

This is the board that im using. Attached is the pic and the specifications.

41ba8c2fd04e38fe42f1e77447a55684072e8080.png

Do i have to connect all my sensors to arduino uno to heltec lora for it to read the sensors and send it to a gateway?

Now it would be a good time for the circuit your are using, how they are exactly connected to Heltec? You have all libraries needed?

Can you test sensors individually without other functionalities?

int LDR = 13;
int PIR = 34;
int RED = 35;

On the IDE, "RED" is shown differently than "LDR" or "PIR", is it different color by a reason? I don't know, just asking...

Cheers,
Kari

I have all the libraries needed, it actually uploaded in my board but it wont read any of my sensors. Its like my sensors are not working but it is actually working lol.

Btw, that RED is my LED, i just name it that way coz my led is color red. :slight_smile:

sittiemartronix:
I have all the libraries needed, it actually uploaded in my board but it wont read any of my sensors. Its like my sensors are not working but it is actually working lol.

Btw, that RED is my LED, i just name it that way coz my led is color red. :slight_smile:

Try simplified code with one sensor at a time to get some readings. How can you say "its like not working, but it is actually working"? What does that mean?

Another stupid question about I2C, those pins... have you tested the oled with these SDA and SCL pins?

Cheers,
Kari

Its working because i tried my sensor to my arduino uno board and my sensors are reading data. But when i connect my sensors to the heltec lora, it wont read the data anymore.

i already tested the oled with the SDA and SCL pins and its working.

Try_sensors_one_at_a_time_with_new_board!
Nothing else connected, but one sensor. Are they all dead?

I got the impression that you just moved your sensors to new board, with old code. Am I wrong?

Cheers,
Kari

And after you have tested, and not working, show us the simple test program you wrote for one sensor.

Cheers,
Kari

Post the simplified code that you used to do a basic test of the DHT11. Hint: if you think the above code qualifies, you're absolutely wrong. Just read the DHT11 and print the reading to Serial Monitor. No display, no LoRa.