My experience with these kind of controllers is basic, so I've tried to edit the demo code's menu-like sketch and incorporate eeprom in it for saving settings.
The issue is this, whenever I try to read a value from the analog in, the controller freezes and does not respond to anything except a reset or a poweroff. I've started noticing this once I've incorporated the eeprom library into my code, however I'm not sure if it is because of this or something else things started to go wrong.
Honestly I just have a feeling I've missed something to initialise or something like that at least. If I re-upload the original sketch it works just fine, yet I fail to see how the original sketch does something different from what I do. I've tried debugging it by adding SerialUSB.writes to it and the controller freezes right after I press the enter button on the setpoint menu also, so it's not only analogRead that freezes (in the other menu it freezes when it initialises LoadVars();) but also the eeprom.readByte.
Code uploaded at https://pastebin.com/TbTNeFda for the sake of readability.
Hi, i tried your code, it works for me; are you providing external power to the INDIO unit with 12/24V on V-/V+? The I/O functions of the baseboard will NOT work on USB power alone.
If that is not the issue, check the version of your topboard, earlier than 1.7 will not have EEPROM, in that case contact Loic on firstname.lastname@example.org
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!