Arduino 背景可以参考官方网站www.arduino.cc 先看一个最简单的示例程序: 打开 Arduino IDE , 选择菜单:文件 -> 示例 -> 01.Basics -> Blink /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LE
0. setup() 与 loop() 函数 void setup(): // put your setup code here, to run once: 仅执行一次: void loop(): // put your main code here, to run repeatedly 会重复执行多次: 1. Blink demo setup: pinMode(LED_BUILTIN, OUTPUT); // pinMode 设置引脚模式 // LED_BUILTIN:arduino 开发板上