通过Arduino编译器查看串口数据。

hello world程序:

void setup(){
  Serial.begin(9600);//打开串口,设置波特率为9600bps
}

void loop(){
  Serial.println("Hello World");
  delay(1000);
}

编译、上传,然后打开编译器的Serial Monitor,即可看到输出的“Hello World”

Arduino学习(2)

 

运行结果:

Arduino学习(2)

相关文章: