Page 1 of 1

Wipy with BMP180 sensor

Posted: Sat Jan 02, 2016 10:54 am
by wipyjan
Hi,

Was anybody get working Wipy with BMP180 sensor with drivers from https://github.com/micropython-IMU/micropython-bmp180 ?

Best Regards

Jan

Re: Wipy with BMP180 sensor

Posted: Thu Jan 07, 2016 4:39 pm
by Turbinenreiter
I wrote that lib.
What's your problem?

I guess you will have to rename stuff, i.e. chang 'pyb' to 'machine' - the API changed. See for the new names:
http://micropython.org/resources/docs/e ... e.I2C.html
You will have to subsitute:
'pyb' - 'machine'
'mem_write' - 'writeto_mem'
'mem_read' - 'readfrom_mem'

Let me know if it works out and if so I would like to merge it. If not I'm here to help.

I will look for someone to shout at for having incompatible APIs on different ports. That sucks.

Re: Wipy with BMP180 sensor

Posted: Fri Jan 08, 2016 7:11 am
by pythoncoder
Turbinenreiter wrote:... I will look for someone to shout at for having incompatible APIs on different ports. That sucks.
The API's are in the process of being standardised. The aim is for the Pyboard specific pyb to be replaced by a more generic machine module, with pyb being retained for compatibility (at least for a period).

I'm not looking forward to porting everything I've written but I can see the logic behind the move.

Re: Wipy with BMP180 sensor

Posted: Sat Oct 08, 2016 5:03 am
by maxlock
FYI for anyone stumbling across this thread I ported a bmp180 lib to machine here:

https://github.com/micropython-IMU/micropython-bmp180

Works fine on my esp8266.

-Max.

Re: Wipy with BMP180 sensor

Posted: Fri Mar 03, 2017 1:04 am
by matrixprogrammer
If still interested, I've posted a working code for BMP180 sensor to WiPy2 board (should work on original WiPy).

https://github.com/matr1xprogrammer/mic ... -bmp180.py

Cheers,
Marlon

Re: Wipy with BMP180 sensor

Posted: Wed May 15, 2019 12:33 am
by hamortar
maxlock wrote:
Sat Oct 08, 2016 5:03 am
FYI for anyone stumbling across this thread I ported a bmp180 lib to machine here:

https://github.com/micropython-IMU/micropython-bmp180

Works fine on my esp8266.

-Max.
Hi Max,
Thanks for publishing your bmp180 lib. I am having some troubles making it work thou.
I am using the same example included in Github, but I am receiving the following error message:
>>> bmp180 = BMP180(bus)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bmp180.py", line 47, in __init__
OSError: [Errno 110] ETIMEDOUT

What is it wrong? Can you help me fixing it?

Re: Wipy with BMP180 sensor

Posted: Wed May 15, 2019 5:19 am
by Roberthh
Which Wipy are you talking about? WiPy1 or Wipy2 or WiPy3? besides that:
Most likely a problem with the connection. SDA and SCL swapped? Missing Pull-up resistors? Missing GND line?

Re: Wipy with BMP180 sensor

Posted: Wed May 15, 2019 1:08 pm
by hamortar
[quote=Roberthh post_id=36522 time=1557897555 user_id=601]
Which Wipy are you talking about? WiPy1 or Wipy2 or WiPy3? besides that:
Most likely a problem with the connection. SDA and SCL swapped? Missing Pull-up resistors? Missing GND line?
[/quote]

i understand. It is most likely there is a physical connection problem. Will check that out. Thanks a lot :P :P :P

Re: Wipy with BMP180 sensor

Posted: Sun Mar 08, 2020 2:11 am
by Kozure Okami
Hi, just my recent experience.
I setup a BMP180 sensor shield with a ESP8266 Wemos D1 mini. First i did it using Arduino firmware and did work well.
Then i tried to do it in Upython and ran into the same issue than hamortar. after troubleshoot it, turned out that scl and sda pins are configured in the shield correctly for arduino but inverted for MicroPython. Once i removed the shield and externally rewired it worked. Haven't tried yet but it seems the pins numbers have to be switched in the library BMP180.py to get the shield to work directly connected to the ESP8266 board.

One question, how the altitude is setup to match the current location? as it is i got a - altitude value. :?:

Re: Wipy with BMP180 sensor

Posted: Sun Mar 08, 2020 8:42 am
by Roberthh
Altitude figures always require a reference. Since the BMP180 measure pressure, altitude can be derived from that, given that the pressure at sea level is known. In order to get a reasonable result with that class, you have to set self.baseline to the actual pressure at sea level. The local weather report usually tells you the "normalized" = "sea level" pressure. So you can take that one. The result you get is as precise as the reference pressure you put into the calculation.