Hello,
The node “random” (nkrkv/random/random) does not work under XOD version 0.32.1 and board Arduino Uno R3.
Get always the error message shown in uploaded picture “error message.png”.
Can someone solve this problem or does anyone know a solution?
Thanks in advance for a quick response.
PS: Similar to post "Do not work node “random” (Do not work node "random") from moi-yashik2 dated Nov ’19.
C:\Users\Chris\AppData\Local\Temp\xod_temp_sketchbookIQsIAu\xod_1592505551808_sketch\xod_1592505551808_sketch.ino: In function ‘void xod::nkrkv__random__random::evaluate(xod::nkrkv__random__random::Context)’:
C:\Users\Chris\AppData\Local\Temp\xod_temp_sketchbookIQsIAu\xod_1592505551808_sketch\xod_1592505551808_sketch.ino:1357:31: error: invalid conversion from ‘long unsigned int*’ to ‘unsigned int*’ [-fpermissive]
int rnd = rand_r(seedp);
^
In file included from C:\Users\Chris\xod_packages_\packages\esp8266\hardware\esp8266\2.4.3/tools/sdk/libc/xtensa-lx106-elf/include/stdlib.h:11:0,
from C:\Users\Chris\xod_packages_\packages\esp8266\hardware\esp8266\2.4.3\cores\esp8266/Arduino.h:27,
from C:\Users\Chris\AppData\Local\Temp\xod_temp_sketchbookIQsIAu\xod_1592505551808_sketch\xod_1592505551808_sketch.ino:18:
C:\Users\Chris\xod_packages_\packages\esp8266\hardware\esp8266\2.4.3/tools/sdk/libc/xtensa-lx106-elf/include/stdlib.h:197:12: error: initializing argument 1 of ‘int rand_r(unsigned int*)’ [-fpermissive]
int _EXFUN(rand_r,(unsigned *_seed));
^
C:\Users\Chris\xod_packages\packages\esp8266\hardware\esp8266\2.4.3/tools/sdk/libc/xtensa-lx106-elf/include/_ansi.h:65:30: note: in definition of macro ‘_EXFUN’ #define _EXFUN(name, proto) name proto
^
Error: exit status 1
Compilation failed.
Compilation failed
Command Process exited with code 1
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.