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
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 DigitalIn p(PTB2); 00005 BusOut myled(PTB8,PTB9,PTB10,PTB11,PTE2,PTE3,PTE4,PTE5); 00006 BusOut moter(PTA1,PTA2); 00007 PwmOut pwm(PTD4); 00008 TextLCD lcd(PTC12,PTC13,PTC16,PTC17,PTA16,PTA17); 00009 00010 int main() { 00011 while(1) { 00012 if(p==1){ 00013 lcd.printf("yes\n"); 00014 pwm=1.0f; 00015 moter=2; 00016 myled=0xff; 00017 } 00018 else{ 00019 lcd.printf("no\n"); 00020 pwm=1.0f; 00021 moter=0; 00022 myled=0x00; 00023 } 00024 } 00025 }
Generated on Fri Aug 26 2022 14:59:54 by
1.7.2