Bmp085 object
AS
Posts: 149
Hi!
I´m not sure how it should be used.
I wrote the code BAROMETRO.SPIN.
(i don´t know how u put it here in boxes, i go "copy paste")
All the files I use are in attachement!
CON
_clkmode = xtal1 + pll16x ' System clock → 80 MHz
_xinfreq = 5_000_000
CR = 13
VAR
word t,p
OBJ
Baro : "bmp085Object"
Debug : "FullDuplexSerialPlus"
PUB Init
Debug.Start(31, 30, 0, 115200)
waitcnt(clkfreq * 2 + cnt)
Baro.init(0,1)
main
PUB Main
repeat
Debug.Str(String(CR, "start calculations....."))
baro.GetPressureTemp(0,1,3,t,p)
Debug.Str(String(CR, "T = "))
Debug.Dec(t)
Debug.Str(String(CR, "P = "))
Debug.Dec(P)
waitcnt(clkfreq*1000 + cnt)
Thanks!
I´m not sure how it should be used.
I wrote the code BAROMETRO.SPIN.
(i don´t know how u put it here in boxes, i go "copy paste")
All the files I use are in attachement!
CON
_clkmode = xtal1 + pll16x ' System clock → 80 MHz
_xinfreq = 5_000_000
CR = 13
VAR
word t,p
OBJ
Baro : "bmp085Object"
Debug : "FullDuplexSerialPlus"
PUB Init
Debug.Start(31, 30, 0, 115200)
waitcnt(clkfreq * 2 + cnt)
Baro.init(0,1)
main
PUB Main
repeat
Debug.Str(String(CR, "start calculations....."))
baro.GetPressureTemp(0,1,3,t,p)
Debug.Str(String(CR, "T = "))
Debug.Dec(t)
Debug.Str(String(CR, "P = "))
Debug.Dec(P)
waitcnt(clkfreq*1000 + cnt)
Thanks!
rar
14K
Comments
I´m not sure how it should be used.
I wrote the code BAROMETRO.SPIN.
All the files I use are in attachement!
Thanks!
AS