Seems to match my other instruments. ut = uncompensated temperature, and up uncompensated pressure.
The module is connected to the Raspi GPIO port,
3 pins are used, connections are shown in the source code. So after fixing a typo, and I had the calibration registers the wrong way around, this works. Tried both fixed and floating point math, same results. Oversampling 0 works too, that is really just a 16 bit ADC read. Code released under the GPL.
So, C compiler, but that one needs MS windows, so I'd rather walk on my hands (see summary).
formatting link
wrote the code in PIC18F (or what passes for that) asm.
It outputs data from 4 BMP180 sensors, front right rear and left, compensated data that is:
Here only the left sensor output is shown (only one connected, but I can swap sensors, made sockets).
Normally nmea mode is selected and the output looks like this (4800 Bd serial):
$PPP,2,A0FCBE04,000000EC,000000EC,00018C61,X*14
If you are good in hex you will notice that the last field says 101473 Pa, or 1014.73 mBar or 1014.73 hPa or whatever. The PIC with 4 sensors will go in the mast, but of course I have to wire things up and test if it actually works to measure wind speed differential this way. The 'X' indicates an error (you can activate test mode in the menu via RS32 and it will tell you all about it) in this case the error is that the first 3 sensors are not connected, normally 'X' is 'A" of 'valid data'.
The assembler gpasm turned out to be OK, I made 2 errors in the iic code that caused wild strange things to happen. Funny, one of those code errors has been in there for years, but somehow never showed up. Now let's see what's flying around? ;-)
mm 6700 lines of asm code not bad, but lost of empty lines of course. The math is interesting, (fun starts at line 5410) I only have signed 32 bit, and sure ran out of bits. Cheated (see code) and get same results as C.
hahaha, was already in code at some other place, but no sda pullup is equivalent to ack ... so flag not set. Added setting error flag to the chip ID compare, that should work, but it's late, testing some other time.
Temperature tracing is getting better, .1 degee C, maybe it is just a thermal gradient from handling, seems to take minutes before it cools of after even touching it.
Added some stuff, most important added moving average over 10 measurements wind_bmp180-0.3.asm
It is pretty straight forward code (moving average at the end of the source). Limited in number of data values (4 bytes per value and 4 sensors and 10 data points per sensor) by RAM. But still a RAM section free. Just thought of some more improvements.
So if you like PIC 18F asm... This Panteltje's Proprietary Protocol Version 3, main difference it sends all temperature values too. Raspi can read them all ;-)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.