SunFounder 3in1 Kit
At the same time, the on-board LED blink.
The Arduino board will automatically run the sketch after power is applied after the sketch is uploaded. The running
program can be overwritten by uploading a new sketch.
2.3.5 Arduino Program Structure
Let’s take a look at the new sketch file. Although it has a few lines of code itself, it is actually an “empty” sketch.
Uploading this sketch to the development board will cause nothing to happen.
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
If we remove setup() and loop() and make the sketch a real blank file, you will find that it does not pass the
verification. They are the equivalent of the human skeleton, and they are indispensable.
During sketching, setup() is run first, and the code inside it (inside {}) is run after the board is powered up or reset
2.3. How to build an Arduino Project 67