potention test program

Dependencies:   C12832_lcd mbed

Committer:
khayakawa
Date:
Mon Sep 16 01:43:39 2013 +0000
Revision:
1:29f7f8843c31
Parent:
0:ea5527eaa968
potention meater test program;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:ea5527eaa968 1 #include "mbed.h"
khayakawa 1:29f7f8843c31 2 #include "C12832_lcd.h"
khayakawa 1:29f7f8843c31 3
khayakawa 1:29f7f8843c31 4 C12832_LCD lcd;
khayakawa 1:29f7f8843c31 5 AnalogIn ain1(p20);
khayakawa 1:29f7f8843c31 6 AnalogIn ain2(p19);
mbed_official 0:ea5527eaa968 7 DigitalOut led(LED1);
khayakawa 1:29f7f8843c31 8
mbed_official 0:ea5527eaa968 9 int main() {
khayakawa 1:29f7f8843c31 10 lcd.cls();
mbed_official 0:ea5527eaa968 11 while (1){
khayakawa 1:29f7f8843c31 12 lcd.locate(0,3);
khayakawa 1:29f7f8843c31 13 lcd.printf("potention1 : %.2f\n", ain1.read());
khayakawa 1:29f7f8843c31 14 lcd.locate(0,15);
khayakawa 1:29f7f8843c31 15 lcd.printf("potention2 : %.2f\n", ain2.read());
khayakawa 1:29f7f8843c31 16 wait(0.1);
mbed_official 0:ea5527eaa968 17 }
mbed_official 0:ea5527eaa968 18 }