Yasushi TAUCHI
/
Analog_test_1
アナログ入力のテスト(ジョイステック)
main.cpp
- Committer:
- yueee_yt
- Date:
- 2011-12-29
- Revision:
- 1:b24f69657abc
- Parent:
- 0:112b27ac26d5
File content as of revision 1:b24f69657abc:
#include "mbed.h" #include "TextLCD.h" TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 AnalogIn x(p19); AnalogIn y(p20); int main() { lcd.cls(); lcd.printf("ADC TEST\n"); while (1) { lcd.locate(0,1); lcd.printf("x=%4.2f y=%4.2f",x.read(),y.read()); wait(0.1f); } }