This program tests Chirp - the soil moisture sensor
Dependencies: Chirp USBDevice mbed
Fork of BME280_Hello by
main.cpp
- Committer:
- Vlad
- Date:
- 2017-01-12
- Revision:
- 4:a1a7af709ddc
- Parent:
- 0:2c9585cecfde
File content as of revision 4:a1a7af709ddc:
#include "mbed.h" #include "USBSerial.h" #include "Chirp.h" USBSerial pc; //I2C_SDA, I2C_SCL #define GROVE_PWR P1_3 // control all grove power, low enable Chirp chirp(P0_5, P0_4); DigitalOut grove_pwr(GROVE_PWR); DigitalOut yellowLED(D8); //DigitalOut yellowLEDGND(D9); DigitalOut blueLED(D4); int main() { yellowLED = 1; // yellowLEDGND = 1; blueLED = 1; wait(2); pc.printf("Running!\n"); while(1) { pc.printf("%2.2f Capacitance %2.2f Temperature \r\n", chirp.getCapacitance(), chirp.getTemperature()); wait(1); } }