This program tests Chirp - the soil moisture sensor
Dependencies: Chirp USBDevice mbed
Fork of BME280_Hello by
Revision 4:a1a7af709ddc, committed 2017-01-12
- Comitter:
- Vlad
- Date:
- Thu Jan 12 22:04:32 2017 +0000
- Parent:
- 3:710f0b2843e4
- Commit message:
- Works
Changed in this revision
diff -r 710f0b2843e4 -r a1a7af709ddc BME280.lib --- a/BME280.lib Fri Jun 26 06:42:06 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/users/MACRUM/code/BME280/#ddcaa259e65b
diff -r 710f0b2843e4 -r a1a7af709ddc Chirp.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Chirp.lib Thu Jan 12 22:04:32 2017 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/Vlad/code/Chirp/#6164b94deb27
diff -r 710f0b2843e4 -r a1a7af709ddc USBDevice.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Thu Jan 12 22:04:32 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/mbotkinl/code/USBDevice/#0f216c4e75e5
diff -r 710f0b2843e4 -r a1a7af709ddc main.cpp --- a/main.cpp Fri Jun 26 06:42:06 2015 +0000 +++ b/main.cpp Thu Jan 12 22:04:32 2017 +0000 @@ -1,18 +1,27 @@ #include "mbed.h" -#include "BME280.h" +#include "USBSerial.h" +#include "Chirp.h" -Serial pc(USBTX, USBRX); +USBSerial pc; -#if defined(TARGET_LPC1768) -BME280 sensor(p28, p27); -#else -BME280 sensor(I2C_SDA, I2C_SCL); -#endif +//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 degC, %04.2f hPa, %2.2f %%\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); + pc.printf("%2.2f Capacitance %2.2f Temperature \r\n", chirp.getCapacitance(), chirp.getTemperature()); wait(1); } }
diff -r 710f0b2843e4 -r a1a7af709ddc mbed.bld --- a/mbed.bld Fri Jun 26 06:42:06 2015 +0000 +++ b/mbed.bld Thu Jan 12 22:04:32 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/9baf128c2fab \ No newline at end of file