Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- titanium
- Date:
- 2021-02-16
- Revision:
- 5:a28271106113
- Parent:
- 4:5656d9c63801
- Child:
- 6:84b3ef333908
File content as of revision 5:a28271106113:
#include "mbed.h" #include "BME280.h" Serial pc(USBTX, USBRX); #if defined(TARGET_LPC1768) BME280 sensor(p28, p27); #elif defined(TARGET_TY51822R3) BME280 sensor(P0_30, P0_7); #else BME280 sensor(SDA, SCL); #endif int main() { while(1) { pc.printf("%2.1f degC %04.1f hPa %2.1f%%\r\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); wait(3); } }