[arduino] 优化默认代码

This commit is contained in:
Meco Man 2022-07-14 06:56:25 -04:00 committed by guo
parent 0fe1d152f0
commit 65a5e3af0f
2 changed files with 4 additions and 8 deletions

View File

@ -10,17 +10,15 @@
#include <Arduino.h>
uint8_t led = LED_BUILTIN;
void setup(void)
{
/* put your setup code here, to run once: */
pinMode(led, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop(void)
{
/* put your main code here, to run repeatedly: */
digitalWrite(led, !digitalRead(led));
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
delay(100);
}

View File

@ -10,17 +10,15 @@
#include <Arduino.h>
uint8_t led = LED_BUILTIN;
void setup(void)
{
/* put your setup code here, to run once: */
pinMode(led, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop(void)
{
/* put your main code here, to run repeatedly: */
digitalWrite(led, !digitalRead(led));
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
delay(100);
}