mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-09 20:45:41 +08:00
[arduino] 优化默认代码
This commit is contained in:
1 parent
0fe1d152f0
commit
65a5e3af0f
2 files changed
+4
-8
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user