I am having an issue when trying to use the 8-Channel 12-Bit ADC for Raspberry Pi. I have followed the setup code and run the code as shown in 8-Channel 12-Bit ADC for Raspberry Pi (STM32F030) - Seeed Wiki. The code I’m running is exactly the same apart from line 4 where ‘ADC_DEFAULT_IIC_ADDR = 0X04’ is changed to ‘ADC_DEFAULT_IIC_ADDR = 0X08’ as this is the address for i2c on the rasberry pi.
I am currently only getting zeros on all output, where i would be expecting a floating value on and ADC which is not connected to anything.
Any advice on how to fix?
I was able to get it working by using the code in the link below.
i changed line 57:
def init(self, address = 0x04): to def init(self, address = 0x08): as this is the address of my i2c on the unit.
you can check the i2c address by opening command prompt and typing ’ i2cdetect -y 1’