projet capteur connecté ST/SE
Dependencies: HP206C mbed HMC5883L DHT DS1820
altitude.cpp@70:1e2e21c377ed, 2018-10-09 (annotated)
- Committer:
- SBACCARI
- Date:
- Tue Oct 09 15:33:37 2018 +0000
- Revision:
- 70:1e2e21c377ed
- Parent:
- 67:3ccbc6a532eb
- Child:
- 75:9f6a6c7d4bea
Pression, T_H_air, Mag en bon fonctionnement
Who changed what in which revision?
User | Revision | Line number | New 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 | { |
SBACCARI | 66:cbfcea17a3c5 | 6 | long P = 0; |
SBACCARI | 70:1e2e21c377ed | 7 | //barometre->reset(); |
SBACCARI | 70:1e2e21c377ed | 8 | //pc.printf("SB, DEBUG : available? => %d \r\n", barometre->isAvailable() ); // DEBUG : show sensor status |
SBACCARI | 66:cbfcea17a3c5 | 9 | wait(2); |
SBACCARI | 67:3ccbc6a532eb | 10 | P = barometre->ReadPressure(); |
SBACCARI | 66:cbfcea17a3c5 | 11 | //pc.printf("P = %ul \r\n", P); // DEBUG : print pressure value |
SBACCARI | 66:cbfcea17a3c5 | 12 | wait(3); |
MathieuM | 49:b1ac7ebb715f | 13 | |
SBACCARI | 66:cbfcea17a3c5 | 14 | return P; |
MathieuM | 49:b1ac7ebb715f | 15 | } |