[arduino] 优化默认代码
This commit is contained in:
parent
0fe1d152f0
commit
65a5e3af0f
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue