![](/media/cache/profiles/3b56beb4fb3143ab7f05335134909435.50x50_q85.jpg)
Variation. Temperature reading moves across x-axis with time, it is positioned in y-axis proportional to temperature as read.
Dependencies: C12832_lcd LM75B mbed
Fork of app-board-LM75B by
main.cpp
- Committer:
- chapfohn
- Date:
- 2013-10-23
- Revision:
- 4:e7ecb33e5806
- Parent:
- 3:4d612f16ad84
- Child:
- 5:b7c60e64fbf0
File content as of revision 4:e7ecb33e5806:
#include "mbed.h" #include "LM75B.h" #include "C12832_lcd.h" #include <math.h> C12832_LCD lcd; LM75B tmp(p28,p27); float temp=0; int i = 0; int n = 129; int main () { lcd.cls(); for (i = 0; i < n; i = i + 1) { temp = floor(tmp.read()); lcd.locate(i,(32-(temp))); lcd.printf("%.0f\n",temp); wait(.1); if (i == (n-10)){ i = 0; lcd.cls(); } else ; } }