Rohm ml8511 hello world application
Dependencies: mbed
Fork of BD1020HFV_Hello by
main.cpp
- Committer:
- MikkoZ
- Date:
- 2016-09-08
- Revision:
- 1:ba7e525074f9
- Parent:
- 0:ee7b9cc966d7
- Child:
- 2:a4e87cfd1e0a
File content as of revision 1:ba7e525074f9:
#include "mbed.h" Serial pc(USBTX, USBRX); AnalogIn sensor(A2); int main() { float temparature; pc.printf("\nBD1020HFV Temperature sensor test program.\n"); while(1) { temparature = -(1000 * (sensor * 3.3f) - 1546) / 8.2; pc.printf("Temperature=%5.3f\r\n", temparature); wait(0.4); } }