Error in HC-SR04 node implementation?

I’m facing this error:

Begin compiling code for the board NodeMCU 1.0 (ESP-12E Module) :package:

C:\Users\uum\AppData\Local\Temp\xod_temp_sketchbookV8sYiM\xod_1607469632040_sketch\xod_1607469632040_sketch.ino:1570:46: error: non-static data member ‘HCSR04_MAX_START_US’ declared ‘constexpr’
constexpr uint32_t HCSR04_MAX_START_US = 5000;
^

C:\Users\uum\AppData\Local\Temp\xod_temp_sketchbookV8sYiM\xod_1607469632040_sketch\xod_1607469632040_sketch.ino:1575:11: error: non-static data member ‘HCSR04_MAX_ROUNDTRIP_US’ declared ‘constexpr’
/ 340ul; // sound speed
^

Error during build: exit status 1

I’m using the latest version of XOD (0.36.1) but the error still pointed to declaration constexpr, where if I’m not mistaken the latest node has changed that to static const. But even if I change (manually) to static const, it runs smoothly but without output (in the watch node).

Please help.

It does not have the ports correctly declared, they are both in D0.

Declare according to ESP-12E pinout and rebuild.

Actually, I’ve tried many times with correct port assignments but the error are still there.

Previously (several months ago) it worked perfectly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.