提交 04294524 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

[bsp][rtduino] update arduino_main.cpp

上级 fab0e506
...@@ -15,11 +15,11 @@ void setup(void) ...@@ -15,11 +15,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
...@@ -13,16 +13,12 @@ ...@@ -13,16 +13,12 @@
void setup(void) void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
pinMode(8, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
Serial.begin();
Serial.println("Hello Arduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
digitalWrite(8, HIGH); digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
delay(500); delay(100);
digitalWrite(8, LOW);
delay(500);
} }
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#define F_CPU 144000000L /* CPU:144MHz */ #define F_CPU 144000000L /* CPU:144MHz */
#define LED_BUILTIN D8
/* Serial1 : PA9-TX PB0-RX */ /* Serial1 : PA9-TX PB0-RX */
#define RTDUINO_SERIAL2_DEVICE_NAME "uart1" #define RTDUINO_SERIAL2_DEVICE_NAME "uart1"
......
...@@ -14,11 +14,11 @@ void setup(void) ...@@ -14,11 +14,11 @@ void setup(void)
{ {
/* put your setup code here, to run once: */ /* put your setup code here, to run once: */
Serial.begin(); Serial.begin();
Serial.println("Hello RTduino!");
} }
void loop(void) void loop(void)
{ {
/* put your main code here, to run repeatedly: */ /* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!"); delay(1000);
delay(800);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册