Wipy with BMP180 sensor

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Post Reply
wipyjan
Posts: 1
Joined: Sat Jan 02, 2016 9:53 am

Wipy with BMP180 sensor

Post by wipyjan » Sat Jan 02, 2016 10:54 am

Hi,

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

Best Regards

Jan

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Wipy with BMP180 sensor

Post by Turbinenreiter » Thu Jan 07, 2016 4:39 pm

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.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Wipy with BMP180 sensor

Post by pythoncoder » Fri Jan 08, 2016 7:11 am

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.
Peter Hinch
Index to my micropython libraries.

maxlock
Posts: 4
Joined: Sat Sep 17, 2016 7:07 pm

Re: Wipy with BMP180 sensor

Post by maxlock » 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.

matrixprogrammer
Posts: 1
Joined: Fri Mar 03, 2017 12:41 am

Re: Wipy with BMP180 sensor

Post by matrixprogrammer » Fri Mar 03, 2017 1:04 am

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

hamortar
Posts: 2
Joined: Wed May 15, 2019 12:26 am

Re: Wipy with BMP180 sensor

Post by hamortar » Wed May 15, 2019 12:33 am

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?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wipy with BMP180 sensor

Post by Roberthh » Wed May 15, 2019 5:19 am

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?

hamortar
Posts: 2
Joined: Wed May 15, 2019 12:26 am

Re: Wipy with BMP180 sensor

Post by hamortar » Wed May 15, 2019 1:08 pm

[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

Kozure Okami
Posts: 3
Joined: Sun Mar 08, 2020 1:47 am

Re: Wipy with BMP180 sensor

Post by Kozure Okami » Sun Mar 08, 2020 2:11 am

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. :?:

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Wipy with BMP180 sensor

Post by Roberthh » Sun Mar 08, 2020 8:42 am

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.

Post Reply