Automation Hat slave register address


Does anyone know the slave register address for the ADC (1,2,3)?
I am connecting using simulink and am presented with this box:
Google Photos

Thank you.

You should read page 23 of this datasheet:

And probably glance over the Python code:

The ADS1015 on Automation HAT can’t be directly read- it must be configured and complete an integration cycle before a valid reading is present.

I pasted the initialization example model from typing raspberrypi_I2C_temp_init into Matlab into my project.
The model is mentioned in this help article:

Go down into the submodel of “Configure TMP102 for Extended Mode” and change the value in the “Write to the Configuration Register”.
I changed the value of hex2dec(‘60B0’) to hex2dec(‘1’) and I was successfully able to read 5 volts through the ADC channel 2
I had to scale it using a gain value of -1/720.

1 Like

Glad you’re up and running, looks like you had quite the journey!

1 Like