On a sunny day (Tue, 02 Jun 2015 16:34:29 +0100) it happened Pomegranate Bastard wrote in :
Ah, yes, I see. That altimeter.c code looks a lot like what I hacked together this morn #define BMP180_SHIFT_BIT_POSITION_BY_16_BITS (12) #define BMP180_SHIFT_BIT_POSITION_BY_08_BITS (8) #define BMP180_PRESSURE_LSB_DATA (1) #define BMP180_PRESSURE_XLSB_DATA (2) etc etc
and then: v_data_u8[BMP180_PRESSURE_MSB_DATA] (BMP180_CALCULATE_TRUE_PRESSURE - p_bmp180->oversamp_setting)); LOL
Must have been some ....
Yes, so preset, there probably is some factory command or register to write those bytes,. It would have helped if the datasheet explained what those calibration variables did, there are many.
I downloaded the free version, I only have wine windows emulator working on an other PC in Linux, and will try it on there. The floating point would be cool for the 18F14, I do everything in 32 bit signed now. And sine and cosine lookup tables.
Yesterday I got fed up with it, and make my own NMEA proprietary protocol, starts with 'P' NMEA, for wind data starts with (direction in degrees and speed in km/h ,serial all at 4800 Bd. $WIMWV,a.a,R,s.s,N,A*hhhh for the wind meter data So now I also parse for sscanf(wind_buffer, "P %d %d %d %d", &hx71_front, &hx711_rear, &hx711_right, &hx711_left); for the HX711 sensors, and do the vector math in C on the PC (=Raspberry), avoiding any math on the PIC.
I will have to add a number to the P, how about $PPP,1, Panteltje's Proprietary Protocol, number 1
A new standard... And then number 2 for the BMP180 sensors That way I can plug in normal commercial wind sensors, my HX711 types, and the BMP180 types without having to change anything, as the software will use the right processing automatically.
I hacked this together this morning,
The probability that code I wrote actually works the first time is in the same order of probability as the big comet coming, the Dinos disappearing, so do not use that code. But at least when the s^Hchips come in I have something to test, and debug.
Hey thanks for the help, I will be going through your altimeter.c C code to see what I missed. I am glad to see somebody writing normal C.