Ultrasonic + LoRaWAN issues

Following from: CubeCell - issues with ultrasonic sensor

I try to using Ultrasonic example (Github HC-SR04.ino) and TinyGPS++ for AS923 LoRaWAN by source code (Github LoRaWan.ino) I encountered unsolvable problems please anyone help me for solving these problems. My source code and the result is shown below.

My Source code: code.ino

Result:

pic 1


pic 2
pic 3

After I testing a result have an issue related timer parameter. The first round of a process is work, after LoRa sleep and second round of a process result of t1 and t2 is incorrect show on pic1.

*** I suppose of this issues is micros function is related timer of LoRaWAN.

*** Anyone have any ideas please suggest me for solve this issues.

*** Tiny GPS++ is work I have only problems on Ultrasonic sensor.

Best Regards,
Bo

@Supporter @wasn

I don’t test the HC-SR04 sample by my self. But could it be that you have problems with the 5V Echo pin?

Her you can find an Explanation. It is for ESP32 but should also work for CubeCell: https://www.instructables.com/id/Modify-Ultrasonic-Sensors-for-3-Volts-Logic-prepar/

1 Like

I have same issues some HC-SR04 module support only 5V.

I solved by…
1.using HC-SR04 module so support 3.3 V HC-SR04 Sensor
2.using external 5 V source if using unsupport 3.3 V

*** i didn’t modify HC-SR04 module support only 5V.