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 00003 PwmOut mypwm(PWM_OUT); 00004 00005 DigitalOut myled(LED1); 00006 DigitalIn myBt(USER_BUTTON); 00007 Serial pc(USBTX,USBRX); 00008 int main() { 00009 00010 //mypwm.period_ms(10); 00011 //mypwm.pulsewidth_ms(1); 00012 00013 //printf("pwm set to %.2f %%\n", mypwm.read() * 100); 00014 pc.baud(115200); 00015 printf("hello world!");//why is cant't printf???? 00016 pc.printf("PChello world!\n"); 00017 while(1) { 00018 if(myBt.read()==0) 00019 { 00020 myled = !myled; 00021 printf("hello world,system had passed%dms\n",(int)us_ticker_read()); 00022 } 00023 //myled = !myled; 00024 wait(0.1); 00025 } 00026 }
Generated on Tue Jul 12 2022 17:50:02 by
1.7.2