安裝測試
一、確認連接埠
控制台->系統->硬體->裝置管理員
二、點選連接埠(COM和LPT),記住COM4(每個機器可能不同),這是Arduino的連接埠地址
三、開啓Arduino
四、成功進入arduino
五、設定連接埠
Tools->Serial Port->COM4(要與裝置管理員顯示的一致)
六、設定後會出現打勾
七、打開範例程式—LED
File->Open->c:Program
Files\Arduinp\examples\01Basics\Blink\Blink.ino
/*
Blink
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:
int led = 13; //LED的長腳接PIN13,短腳接GND
// the setup routine runs once when you
press reset:
void setup() {
//
initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over
again forever:
void loop() {
digitalWrite(led, HIGH); // turn
the LED on (HIGH is the voltage level)
delay(1000); // wait
for a second
digitalWrite(led, LOW); // turn
the LED off by making the voltage LOW
delay(1000); // wait
for a second
}
八、接好硬體
LED的長腳接PIN13,短腳接GND
九、按File->Upload就開始上傳執行碼
十、上傳完,可見LED一閃一閃
沒有留言:
張貼留言