a
Dependencies: mbed Sht31 MAX44009
Diff: main.cpp
- Revision:
- 1:3889765eb394
- Parent:
- 0:b1b7113a1441
- Child:
- 2:b366d73a213c
--- a/main.cpp Mon Apr 13 08:52:36 2020 +0000 +++ b/main.cpp Mon Apr 13 09:28:27 2020 +0000 @@ -9,6 +9,9 @@ MAX44009 myMAX44009 ( p9, p10, MAX44009::MAX44009_ADDRESS_A0_GND, 400000 ); I2C i2c(p9, p10); //pins for I2C communication (SDA, SCL) +DigitalOut Batt2SYS(p8); + +InterruptIn BLE_Can_temp(p12); DigitalOut BLE_Can_receive(p11); // 0 = can recieve @@ -41,12 +44,18 @@ TandH THavg; float luxavg; +DigitalOut led(LED1); + +void flip() { + led = !led; +} int main() { pc.baud ( 19200 ); + Batt2SYS = 0; - + BLE_Can_temp.fall(&flip); while(1) { counter = counter%10; //BLE_Can_receive = 0;