Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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;
}
}
}