![](/media/cache/profiles/eb1feb5ab28dec83652dd1e5c673f256.jpg.50x50_q85.jpg)
A simple example adopting SHT21 Arduino library to mbed.
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); } }