Version finale
Dependencies: mbed
Fork of Main_V3_Old by
main.cpp@3:534235b99bc6, 2017-10-02 (annotated)
- Committer:
- ramialjed
- Date:
- Mon Oct 02 12:47:09 2017 +0000
- Revision:
- 3:534235b99bc6
- Child:
- 4:784c4b53a3d4
Hello
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ramialjed | 3:534235b99bc6 | 1 | #include "mbed.h" |
ramialjed | 3:534235b99bc6 | 2 | |
ramialjed | 3:534235b99bc6 | 3 | #include "TSL2561.h" |
ramialjed | 3:534235b99bc6 | 4 | |
ramialjed | 3:534235b99bc6 | 5 | |
ramialjed | 3:534235b99bc6 | 6 | //Déclaration variables |
ramialjed | 3:534235b99bc6 | 7 | TSL2561 LUM(PB_7,PB_6); // Luminosité (I2C:SDA,SCL) |
ramialjed | 3:534235b99bc6 | 8 | AnalogIn Humidite(PA_0); |
ramialjed | 3:534235b99bc6 | 9 | Serial PC(PA_2, PA_3); |
ramialjed | 3:534235b99bc6 | 10 | |
ramialjed | 3:534235b99bc6 | 11 | int main() { |
ramialjed | 3:534235b99bc6 | 12 | |
ramialjed | 3:534235b99bc6 | 13 | while(1) { |
ramialjed | 3:534235b99bc6 | 14 | printf("Lum: %f \r\n", LUM.lux()); |
ramialjed | 3:534235b99bc6 | 15 | printf("Hum: %f \n\r",Humidite.read()); |
ramialjed | 3:534235b99bc6 | 16 | |
ramialjed | 3:534235b99bc6 | 17 | wait(1); |
ramialjed | 3:534235b99bc6 | 18 | } |
ramialjed | 3:534235b99bc6 | 19 | } |