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:
- pmic
- Date:
- 2019-06-25
- Revision:
- 4:cdf9641ba817
- Parent:
- 3:aa6c88a89226
- Child:
- 6:898a83da0661
File content as of revision 4:cdf9641ba817:
#include "mbed.h" #include "HP206C.h" Serial serial(SERIAL_TX, SERIAL_RX); HP206C barometer(D14, D15); float altitude = 0.0f; int main() { serial.baud(115200); barometer.reset(); while(1) { altitude = barometer(); serial.printf("altitude %f\r\n", altitude); wait_ms(20); // don't hammer the serial console } }