Hi, I just purchased a Unicorn HAT Mini to go with a Raspberry Pi Zero WH. When I try to run the example Python scripts following the instructions here, I get a ‘No ADC detected’ error (see below). I have tried two different Pis and tested Bullseye and Bookworm. The installation script set do_spi and do_i2c to 0, so I think those are good (and I did restart after those changes). I’ve also tried as a user and root with the same results. Thanks for any help you can provide.
output.py
This Automation HAT Mini example toggles and displays the
status of the three 24V-tolerant digital outputs.
Press CTRL+C to exit.
Traceback (most recent call last):
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/automationhat/__init__.py", line 367, in setup
chip_type = _ads1015.detect_chip_type()
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/ads1015/__init__.py", line 70, in wrapper
return func(self, *args, **kwargs)
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/ads1015/__init__.py", line 248, in detect_chip_type
self._ads1015.set("CONFIG", mode="single")
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/i2cdevice/__init__.py", line 215, in set
self.read_register(register)
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/i2cdevice/__init__.py", line 183, in read_register
self.values[register.name] = self._i2c_read(register.address, register.bit_width)
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/i2cdevice/__init__.py", line 288, in _i2c_read
for x in self._i2c.read_i2c_block_data(self._i2c_address, register, bit_width // self._bit_width):
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/smbus2/smbus2.py", line 617, in read_i2c_block_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Pimoroni/automationhat/examples/hat-mini/output.py", line 77, in <module>
automationhat.output[channel].write(state)
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/automationhat/__init__.py", line 238, in write
self.setup()
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/automationhat/__init__.py", line 217, in setup
setup()
File "/home/pi/.virtualenvs/pimoroni/lib/python3.9/site-packages/automationhat/__init__.py", line 369, in setup
raise RuntimeError("No ADC detected, check your connections")
RuntimeError: No ADC detected, check your connections