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:
Thank you.
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:
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.
Glad youāre up and running, looks like you had quite the journey!