CT Calibration selection from Pi2

Checking the common “AVR” software from Github a little while ago for someone else, I found the ‘l’ (List) command didn’t work for me either (Ubuntu Linux). I tracked it down to what I think is faulty programming in the configuration part of the sketch, where in parsing the command a check is made on the length of the command string (“len = …”). From memory, the test is “==1” and I found the actual length was 2. Trystan thinks it’s not a problem. The line ending sent (CR, LF or both) might be relevant. I was using the Arduino IDE V1.8.

If you’re in sleuth mode, that’s where to start looking.

avrdb_firmware/emon_DB_12CT/emon_DB_12CT_config.ino at master · openenergymonitor/avrdb_firmware · GitHub Line 312. And all the commands are at the top of that file.

I wrote the original “config” sketch back in 2021 and it’s documented here The emonPiCM, but I didn’t recognise some significant parts so it’s been changed since. I’m quite sure the original code worked as documented.

1 Like