Freeze upon Indio.analogRead/eeprom read?
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 email@example.com
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!
About This Forum
This community is for professionals and enthusiasts of our products and services.Read Guidelines
|Asked: 4/10/20, 1:39 PM|
|Seen: 1201 times|
|Last updated: 4/13/20, 2:46 AM|
Topboard says rev 1.7 so I guess I'm fine? I tested it with the board connected to a 24Vdc PS. It works flawlessly now. Why is it that the demo sketch works fine? I mean I get results reading the analog inputs with the demo sketch, but when I load mine it crashes