<div dir="ltr">THANK YOU Tim! Sometimes you can't see the wood for the trees - I inherited that old code and it didn't occur to me to see if someone had since made a Python 3 Adafruit library. That works perfectly and is super easy to install and use.<div><br></div><div>The Barometric Pressure sensor *shall* go to the ball! :)</div><div><br></div><div>Laura</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 10:17 AM, Tim Golden <span dir="ltr"><<a href="mailto:mail@timgolden.me.uk" target="_blank">mail@timgolden.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 20/12/2016 09:38, Laura Sach wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I'm working on a resource which reads weather data, and I'm using this<br>
code to read data from a BMP180 barometric pressure sensor.<br>
<br>
<a href="https://github.com/lawsie/barometric-sensor" rel="noreferrer" target="_blank">https://github.com/lawsie/baro<wbr>metric-sensor</a><br>
</blockquote>
<br></span>
Laura,<br>
<br>
I may be missing something, but it looks to me as though Adafruit have already done this for the modules you're using. The repo you point to at the head of the backend file:<br>
<br>
  <a href="https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/" rel="noreferrer" target="_blank">https://github.com/adafruit/Ad<wbr>afruit-Raspberry-Pi-Python-Cod<wbr>e/</a><br>
<br>
describes how they've broken the code out into smaller repos and made them work with Py2/3.<br>
<br>
Certainly<br>
<br>
  <a href="https://github.com/adafruit/Adafruit_Python_BMP" rel="noreferrer" target="_blank">https://github.com/adafruit/Ad<wbr>afruit_Python_BMP</a><br>
<br>
and<br>
<br>
<br>
<a href="https://github.com/adafruit/Adafruit_Python_GPIO/blob/master/Adafruit_GPIO/I2C.py" rel="noreferrer" target="_blank">https://github.com/adafruit/Ad<wbr>afruit_Python_GPIO/blob/master<wbr>/Adafruit_GPIO/I2C.py</a><br>
<br>
seem, by inspection, to be 2/3 compatible.<br>
<br>
I'm happy to help, but is it possible that you're re-inventing the wheel here? Or have I missed something?<br>
<br>
<br>
TJG<br>
</blockquote></div><br></div>