Arduino Basics: Blink - First Sketch
The Blink sketch is the classic first program for Arduino. It helps you test that your board and IDE are working correctly by making the onboard LED blink.
Loading the Blink Example
Open the Arduino IDE.
Go to File > Examples > 01.Basics > Blink.
The Blink sketch will open in a new IDE window.
Uploading the Sketch
Make sure your board and COM port are selected correctly under Tools > Board and Tools > Port.
Click the Upload button (right-arrow icon).
The onboard LED (usually labeled LED_BUILTIN) should start blinking once the upload is complete.
Modifying the Blink Speed
The blink speed is controlled by the delay() function in the sketch:
delay(1000); // waits 1000 milliseconds (1 second)
Change the values in delay() to make the LED blink faster or slower.
After modifying, click Upload again to see the changes in action.