projet capteur connecté ST/SE

Dependencies:   HP206C mbed HMC5883L DHT DS1820

Committer:
MathieuM
Date:
Mon Dec 10 11:26:41 2018 +0000
Revision:
82:6f5913a97489
Parent:
77:67faccef7f14
Various updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SBACCARI 66:cbfcea17a3c5 1 #include "altitude.h"
MathieuM 49:b1ac7ebb715f 2 #include "config.h"
Edern 15:591f765c620d 3
SBACCARI 67:3ccbc6a532eb 4 long pression(HP20x_dev* barometre)
SBACCARI 66:cbfcea17a3c5 5 {
Edern 75:9f6a6c7d4bea 6 char ret = barometre -> isAvailable();
Edern 75:9f6a6c7d4bea 7 if (ret){
Edern 75:9f6a6c7d4bea 8 long P = 0;
Edern 75:9f6a6c7d4bea 9 //barometre->reset();
Edern 75:9f6a6c7d4bea 10 //pc.printf("SB, DEBUG : available? => %d \r\n", barometre->isAvailable() ); // DEBUG : show sensor status
MathieuM 77:67faccef7f14 11 //wait(2);
Edern 75:9f6a6c7d4bea 12 P = barometre->ReadPressure();
Edern 75:9f6a6c7d4bea 13 //pc.printf("P = %ul \r\n", P); // DEBUG : print pressure value
MathieuM 77:67faccef7f14 14 //wait(3);
Edern 75:9f6a6c7d4bea 15 return P;
MathieuM 77:67faccef7f14 16 } else {
MathieuM 77:67faccef7f14 17 return -1;
Edern 75:9f6a6c7d4bea 18 }
MathieuM 49:b1ac7ebb715f 19 }