projet capteur connecté ST/SE
Dependencies: HP206C mbed HMC5883L DHT DS1820
altitude.cpp@67:3ccbc6a532eb, 2018-10-09 (annotated)
- Committer:
- SBACCARI
- Date:
- Tue Oct 09 15:14:35 2018 +0000
- Revision:
- 67:3ccbc6a532eb
- Parent:
- 66:cbfcea17a3c5
- Child:
- 70:1e2e21c377ed
v0.2
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 | 67:3ccbc6a532eb | 7 | barometre->reset(); |
SBACCARI | 66:cbfcea17a3c5 | 8 | //pc.printf("SB : 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 | } |