Heated Bed WorkingIt turns out the BeagleBone ADC "helper" kernel drivers are very particular about exactly how you talk to them. If you try to read from them too fast, or even worse have two threads trying to read ADC values at the same time, Bad Things happen. What exactly? You can get illegal values (outside the 0-4095 range of the ADC), values from the wrong analog input channel, or have your program crash with access errors. This has been preventing me from getting the heated bed working on my printer, since I initially coded the ADC thermistor HAL component with the idea that each thermistor would be read by it's own thread.
I have re-worked the python code to support reading more than one thermistor, and it seems to be working well. I managed to finish a print that took a couple hours, and I left the system running overnight and it is still working as expected this morning. For comparison, with two threads reading thermistor values, one of the threads would die within a couple of minutes.
Configuration should be fairly obvious, refer to the example BeBoPr and BeBoPr-Bridge configurations. There is a new --num_chan parameter, and the existing --adc and --therm parameters now take a list of values, one for each analog input channel. Also added is a short-hand notion for the thermistor table, so you can now use "1" (the equivalent Marlin thermistor table number) instead of "epcos_B57560G1104". Handy if you have 3 thermistors attached!