Automation HAT ADC issue

Hmm, it’s quite possible something else is running- either in code or otherwise- that’s messing up the readings. I have a suspicion it could be some conflict between the sn3218 (that drives the LEDs) and the ADC, since they share the i2c bus and I seem to have been profoundly stupid here:

https://github.com/pimoroni/automation-hat/blob/5e32c9f6d31aa3741d8e291600cafe1f080873ba/library/automationhat/init.py#L310-L315

Which means that both of these threads are running simultaneously and potentially conflicting the bus.

If you get a moment, could you grab the code from GitHub, edit this file to remove the _auto_lights code, and install the library?

git clone https://github.com/pimoroni/automation-hat/
cd library
nano automationhat/__init__.py

Comment out the thread startup so it looks like:

#if is_automation_hat():
#    _t_auto_lights = AsyncWorker(_auto_lights)
#    _t_auto_lights.start()

And then install with:

sudo python setup.py install

And see if that fixes your ADC issues.