by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"
main.cpp
- Committer:
- robt
- Date:
- 2013-05-24
- Revision:
- 0:e2c8a8062bb5
File content as of revision 0:e2c8a8062bb5:
/*Program Example 8.7: Display analog input data */ #include "mbed.h" #include "TextLCD.h" TextLCD lcd(p19, p20, p21, p22, p23, p24); //rs,e,d0, d1,d2,d3 AnalogIn Ain(p17); float percentage; int main() { while(1){ percentage=Ain*100; lcd.printf("%1.2f",percentage); wait(0.002); lcd.cls(); } }