1. //初始化硬件相关配置
    2. void setup()
    3. {
    4. //设置板子D2为输出模型,可以输出电压
    5. pinMode(D2, OUTPUT);
    6. }
    7. //
    8. void loop()
    9. {
    10. digitalWrite(D2, HIGH); // Turn the LED on (HIGH is the voltage level)
    11. delay(1000); // Wait for a second
    12. digitalWrite(D2, LOW); // Turn the LED off by making the voltage LOW
    13. delay(1000); // Wait for a second
    14. }