yutaro okamura / Mbed 2 deprecated test2-7

Dependencies:   TextLCD mbed

main.cpp

Committer:
namazunlv100
Date:
2016-04-25
Revision:
0:01dccff562c7

File content as of revision 0:01dccff562c7:

#include "mbed.h"
#include "TextLCD.h"

DigitalIn p(PTB2);
BusOut myled(PTB8,PTB9,PTB10,PTB11,PTE2,PTE3,PTE4,PTE5);
BusOut moter(PTA1,PTA2);
PwmOut pwm(PTD4);
TextLCD lcd(PTC12,PTC13,PTC16,PTC17,PTA16,PTA17);

int main() {
    while(1) {
        if(p==1){
            lcd.printf("yes\n");
            pwm=1.0f;
            moter=2;
            myled=0xff;
        }
        else{
            lcd.printf("no\n");
            pwm=1.0f;
            moter=0;
            myled=0x00;
        }
    }
}