Arduino Tutorials – [1] Hello World

Getting prepared for these things:

  • Arduino
  • USB Cable
  • PC
  • Internet


First things first, let’s install Arduino IDE so that we can upload the code to the Arduino board.

  1. Download the software from or
  2. Install it. The drivers are included. Please choose “Install” when the driver installing box appears.  AT1-Screenshot-1
  3. Well done~


Secondly, let’s upload a test code.

  1. Connect your Arduino to your PC with an USB Cable.
  2. Launch Arduino IDE, then select Board Model (Arduino UNO) and Port in “Tools” (depending on your PC settings)AT1-Screenshot-2
  3. Click “File” -> “Example” -> “01. Basics” -> “Blink”, then click the second button on the top bar “Upload”.AT1-Screenshot-3
  4. Wait a moment until the code is uploaded.
  5. If all things don’t get wrong, you can see a light on the board blinking.
  6. Congratulations~ You succeed.


At last, you should understand the code.

Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
// 在大多数Arduino板上,引脚13连接着一个板载的LED灯。
// 然后定义一个变量叫做 led,并赋值为13。
int led = 13;

// the setup routine runs once when you press reset:
// 一个被命名为setup的子程序在你按下RESET按钮(或刚上电)后只运行花括号里的代码一次。它通常用于初始化的工作。

void setup() {
// initialize the digital pin as an output.
// 一个被命名为setup的子程序在你按下RESET按钮(或刚上电)后只运行花括号里的代码一次。它通常用于初始化的工作。



//pinMode(pin, OUTPUT 或 INPUT);
//	     |               |
//要设置引脚模式的引脚   引脚模式(输出或输入)
pinMode(led, OUTPUT);

// the loop routine runs over and over again forever:
// 又一个被命名为loop的子程序在执行完setup后一遍又一遍地执行花括号里的代码。
void loop() {
digitalWrite(led, HIGH);
// turn the LED on (HIGH is the voltage level)
// 设置led(13)引脚输出高电平。点亮LED。

// 设置引脚输出函数用法:
//digitalWrite(pin, HIGH 或 LOW);
//              |        |
// 要设置输出的引脚  输出电平(高电平或低电平)

// wait for a second
// 延时1000毫秒(1秒)。

// 延时函数用法:
//       |

digitalWrite(led, LOW);
// turn the LED off by making the voltage LOW
// 设置led(13)引脚输出低电平。熄灭LED。

// wait for a second
// 延时1000毫秒(1秒)。

So fun. Try to change the time to delay. Then upload the code. What can you see?

5 thoughts on “Arduino Tutorials – [1] Hello World

  1. 几点tips(关于你的VPS):
    1、建议把SSL证书换成2048位的,并升级Apache或换Nginx(不然TLS流量不支持SIN,Chrome会回报:”该网站所使用的安全设置已过期,这可能会导致日后版本的Chrome无法安全访问此网站”,反正你也是WoSign Free,重新签发一遍没问题啊

Leave a Reply

Your email address will not be published. Required fields are marked *