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 left(p19); 00005 DigitalIn right(p20); 00006 PwmOut servo(p21); 00007 TextLCD lcd(p24, p26, p27, p28, p29, p30); 00008 00009 int main() { 00010 lcd.cls( ); 00011 servo.period(0.04); 00012 while(1) { 00013 lcd.locate(0,0); 00014 if ( left == 1 ){ 00015 lcd.printf("Left "); 00016 servo.pulsewidth_us(1200); 00017 }else if ( right == 1 ){ 00018 lcd.printf("Right "); 00019 servo.pulsewidth_us(1800); 00020 }else{ 00021 lcd.printf(" "); 00022 servo.pulsewidth_us(1500); 00023 } 00024 } 00025 }
Generated on Fri Jul 22 2022 04:24:33 by
1.7.2