hello world
Revision 1:b97739800353, committed 2016-11-10
- Comitter:
- zef
- Date:
- Thu Nov 10 09:02:08 2016 +0000
- Parent:
- 0:b43404785506
- Commit message:
- add usb serial
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 10 08:18:55 2016 +0000
+++ b/main.cpp Thu Nov 10 09:02:08 2016 +0000
@@ -4,17 +4,21 @@
DigitalOut myled(LED1);
DigitalIn myBt(USER_BUTTON);
+Serial pc(USBTX,USBRX);
int main() {
//mypwm.period_ms(10);
//mypwm.pulsewidth_ms(1);
//printf("pwm set to %.2f %%\n", mypwm.read() * 100);
- printf("hello world!");
+ pc.baud(115200);
+ printf("hello world!");//why is cant't printf????
+ pc.printf("PChello world!\n");
while(1) {
if(myBt.read()==0)
{
myled = !myled;
+ printf("hello world,system had passed%dms\n",(int)us_ticker_read());
}
//myled = !myled;
wait(0.1);