openCR-串口打印HelloWorld

/*
 * Serial_HelloWorld
*/
volatile int nCount=0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  //print "Hello World!!" to PC though USB Virtual COM port
  Serial.println("Hello World!!");
  Serial.print("nCount : "); // display nCount variable and increase nCount.
  Serial.println(nCount++);
  
  delay(1000);
}

  选择“工具”->"串口监视器",结果如下:

posted @ 2018-11-15 16:42  kay880  阅读(363)  评论(0编辑  收藏  举报