准备硬件板子
注:
-
需要自带一根USB type-B 到type-A的转接线
- Genuino 与 Arduino的区别:
Genuino is Arduino.cc’s sister-brand created by Arduino co-founders Massimo Banzi, David Cuartielles, Tom Igoe, and David Mellis, the Arduino.cc team and community.This brand is used for boards and products sold outside the US.
下载软件 IDE
下载 Arduino IDE
安装驱动
插上USB链接的板子,提示驱动未安装如下:
选择Arduino IDE的解压路径下的drivers文件夹,并单击下一步:
等待安装完成
此时,再看计算机管理,驱动正确安装
运行跑马灯
打开arduino.exe
,并打开跑马灯例程
打开工具
,并选择Arduino对应的板子型号和串口
稍微修改下两灭灯的时间比,如下亮3s,灭1s:
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://www.arduino.cc
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(3000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
上传BIN文件到板子(自动编译)