Test code for the BMP085 sensor (pression and temperature) with the nRF51822 platform.
Dependencies: BMP085 mbed nRF51822_blinky
Fork of nRF51822_blinky by
main.cpp
00001 #include "mbed.h" 00002 #include "BMP085.h" 00003 00004 DigitalOut myled(LED1); 00005 BMP085 bmp085(D14,D15); 00006 Serial pc(USBTX, USBRX); 00007 00008 int main() { 00009 while(1) { 00010 myled = 1; 00011 wait(1); 00012 00013 bmp085.update(); 00014 pc.printf("Result --> p:%6.2f hPa / t:%6.2f C \r\n", bmp085.get_pressure(), bmp085.get_temperature()); 00015 00016 myled = 0; 00017 wait(1); 00018 } 00019 }
Generated on Fri Jul 15 2022 18:52:54 by 1.7.2