Dependencies:   TextLCD mbed

Committer:
TANI1
Date:
Tue Apr 26 07:55:41 2016 +0000
Revision:
0:5571d9923fcf
LCD

Who changed what in which revision?

UserRevisionLine numberNew contents of line
TANI1 0:5571d9923fcf 1 #include "mbed.h"
TANI1 0:5571d9923fcf 2 #include "TextLCD.h"
TANI1 0:5571d9923fcf 3 TextLCD lcd(PTC12,PTC13,PTC16,PTC17,PTA16,PTA17);
TANI1 0:5571d9923fcf 4 BusOut myleds(PTB8,PTB9,PTB10,PTB11,PTE2,PTE3,PTE4,PTE5);
TANI1 0:5571d9923fcf 5 BusOut motor(PTA1,PTA2);
TANI1 0:5571d9923fcf 6 DigitalIn p(PTB2);
TANI1 0:5571d9923fcf 7
TANI1 0:5571d9923fcf 8 int main() {
TANI1 0:5571d9923fcf 9 while(1) {
TANI1 0:5571d9923fcf 10 if(p==1){
TANI1 0:5571d9923fcf 11 myleds=0xff;
TANI1 0:5571d9923fcf 12 motor=0x1;
TANI1 0:5571d9923fcf 13 lcd.printf("ON \n");
TANI1 0:5571d9923fcf 14 }
TANI1 0:5571d9923fcf 15 else{
TANI1 0:5571d9923fcf 16 myleds=0x00;
TANI1 0:5571d9923fcf 17 motor=0x0;
TANI1 0:5571d9923fcf 18 lcd.printf("OFF\n");
TANI1 0:5571d9923fcf 19 }
TANI1 0:5571d9923fcf 20 }
TANI1 0:5571d9923fcf 21 }