# Automation Hat slave register address

**URL:** <https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112>\
**Category:** Raspberry Pi\
**Created:** [July 10, 2018, 10:03pm UTC](https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112 "2018-07-10T22:03:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![i621148](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@i621148](https://forums.pimoroni.com/u/i621148)\
**Post date:** [July 10, 2018, 10:03pm UTC](https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112/1 "2018-07-10T22:03:32Z")

</div>

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](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/1/16fd03b5232a97f885279d3df22c13a259a371be.jpeg "New photo by Michael Jenkins") ](https://photos.google.com/share/AF1QipOPHR-wFLw9xtYLwYk2wDag6ZqOEXgfE2OeVLsv2DDsfZ68ivRi3c5cvJsoVNL5HQ?key=eTlVd242cUlaVnMxc2lTZUZ1NVMyYmpnXzZmWWZB)

Thank you.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [July 11, 2018, 4:13pm UTC](https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112/3 "2018-07-11T16:13:51Z")

</div>

You should read page 23 of this datasheet: [http://www.ti.com/lit/ds/symlink/ads1015.pdf](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](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.

---

<div class="post-metadata">

**Author:** ![i621148](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@i621148](https://forums.pimoroni.com/u/i621148)\
**Post date:** [July 11, 2018, 8:33pm UTC](https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112/6 "2018-07-11T20:33:11Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [July 12, 2018, 8:40am UTC](https://forums.pimoroni.com/t/automation-hat-slave-register-address/8112/7 "2018-07-12T08:40:44Z")

</div>

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