Automation Hat slave register address

Hello,

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: http://www.ti.com/lit/ds/symlink/ads1015.pdf

And probably glance over the Python code: https://github.com/pimoroni/automation-hat/blob/master/library/automationhat/ads1015.py

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:
https://www.mathworks.com/help/releases/R2018a/supportpkg/raspberrypi/examples/read-temperature-from-a-tmp102-sensor.html

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