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 00007 void check_end(){ 00008 int sub_end = 0; 00009 for(int i=0;i<=16;i++){ 00010 if(ship_underATK[i]!=0){ 00011 sub_end++; 00012 } 00013 if(sub_end==15){ 00014 bt.putc('q'); 00015 } 00016 } 00017 } 00018 00019 void check_waiting_start(){ 00020 if(bt.readable()){ 00021 if(bt.getc()=='W'){ 00022 check_wait = 1; 00023 pc.printf("joe"); 00024 } 00025 } 00026 } 00027 00028 int main() { 00029 00030 mypwm.period_ms(10); 00031 mypwm.pulsewidth_ms(1); 00032 00033 printf("pwm set to %.2f %%\n", mypwm.read() * 100); 00034 00035 while(1) { 00036 myled = !myled; 00037 wait(1); 00038 } 00039 }
Generated on Tue Jul 12 2022 21:13:56 by
1.7.2