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.
Revision 6:84b3ef333908, committed 2022-09-10
- Comitter:
- hakim_belm
- Date:
- Sat Sep 10 09:20:16 2022 +0000
- Parent:
- 5:a28271106113
- Commit message:
- librairie BME280 corrigee
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Feb 16 06:43:26 2021 +0000 +++ b/main.cpp Sat Sep 10 09:20:16 2022 +0000 @@ -3,16 +3,12 @@ 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 + +BME280 sensor(I2C_SDA, I2C_SCL,0x77); + int main() { - + sensor.initialize(); while(1) { pc.printf("%2.1f degC %04.1f hPa %2.1f%%\r\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); wait(3);