Page 1 of 1

mio crash after infinite loop

Posted: 13 Jan 2023, 16:48
by ydna1979
after crashing my whole setup with an infinite loop function, the power led on my mio flashes red i get this at the terminal
pi@RevPi81739:~ $ piTest -d
Found 2 devices:

Address: 0 module type: 95 (0x5f) RevPi Core V1.2
Module is present
input offset: 0 length: 6
output offset: 6 length: 5

Address: 32 module type: 32886 (0x8076) RevPi MIO V0.0
Module is NOT present, data is NOT available!!!
input offset: 11 length: 34
output offset: 45 length: 27
i got the core module back up by going into pictory and chanbging some settings which unfroze node red but it seems my mio is toast. Any ideas?

Re: mio crash after infinite loop

Posted: 13 Jan 2023, 18:40
by nicolaiB
Please provide more details about your setup and how your "inifinite loop" looks like. Thanks

Nicolai

Re: mio crash after infinite loop

Posted: 14 Jan 2023, 19:10
by ydna1979
var m = msg.payload;
var local_bag_pressure = m;
do{
// store bagpressure as a global var
global.set("bag_pressure", local_bag_pressure);
}
while (m > 0)
return msg;
The function above was meant to read from a pressure sensor and update a global variable. I obviously wrote it incorrectly. When i deployed it, node red completely bogged down into an unusable state. I was able to recover the system by deactivating the input pin for the sensor in pictory. Unfortunately, I noticed that after doing so the red power light was flashing red and i could not get a response from the mio.