ArduinoでLチカ

Arduinoを買って動かしてみた。

USBを差しても動かなかったので、

http://garretlab.web.fc2.com/arduino/introduction/installation/

こちらを読んで、IDEを解凍したフォルダの\driveからドライバを読み込ませる。

以下のプログラムでLEDを動かした。

>>

const int LED = 13;

void setup()
{
  pinMode(LED,OUTPUT);
}

void loop()
{
  digitalWrite(LED,HIGH);
  delay(1000);
  digitalWrite(LED,LOW);
  delay(1000);
}

<<

http://www.musashinodenpa.com/arduino/ref/

大体ここを読めば動作は理解できた。