たけし みわ
/
y_analog
Diff: main.cpp
- Revision:
- 0:c5af10b9239f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 17 01:13:24 2012 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" +#include "TextLCD.h" + +TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 + +AnalogIn ain(p20); + +int main() { + lcd.locate(0,0);lcd.printf("0.0000 - 1.0000"); + while(1) { + lcd.locate(5,1);lcd.printf("%4.4f",ain.read()); + } +}