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:
- odtulumbedder
- Date:
- 2017-09-13
- Revision:
- 1:f4a1942b4486
- Parent:
- 0:062188c0bb61
File content as of revision 1:f4a1942b4486:
#include "mbed.h"
#include "SHT21.hpp"
SHT21 sht21(PB_9 /* I2C_SDA */, PB_8 /* I2C_SCL */);
Serial pc(USBTX, USBRX);
int main() {
while(1) {
pc.printf(
"%2.2f degC, %2.2f %%\n",
sht21.temperature(),
sht21.humidity());
wait(1);
}
}