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 DigitalOut led(PTB19); //green 00003 Serial pc(USBTX, USBRX); // tx, rx 00004 00005 Ticker period; 00006 00007 uint16_t j=0; 00008 00009 void tick() 00010 { 00011 00012 if (j<2500) { 00013 led=0; 00014 } else { 00015 led=1; 00016 } 00017 00018 j++; 00019 j%=10000; 00020 00021 } 00022 00023 int main() 00024 { 00025 // period.attach_us(tick,100); // serial and blink work 00026 period.attach_us(tick,20); //nope 00027 00028 00029 while (1) { 00030 pc.printf("j: %d\n\r",j ); 00031 00032 } 00033 00034 }
Generated on Sun Jul 24 2022 07:59:01 by
1.7.2