I got an Arduino microcontroller, so I tried lighting up an LED.
Environment
You need a tool called Arduino IDE.
https://www.arduino.cc/en/Main/Software
Output Hello World to Log
First, output Hello World to check the operation. Very easy to understand.
http://share-lab.net/arduino-helloworld1
Script to Light Up LED
Preparation
Insert the short leg into the “GND pin” and the long leg into “pin 13”.
Source
Repeats light on → light off every 5 seconds
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(5000);
digitalWrite(13, LOW);
delay(5000);
}