Arduino always expects that you’ve created two functions: one called setup()
and one called loop()
.
setup()
is where you put all the code that you want to execute once at the beginning of your program, and loop()
contains the core of your program, which is executed over and over again. This is done because Arduino is not like your regular computer—it cannot run multiple programs at the same time, and programs can’t quit. When you power up the board, the code runs; when you want to stop, you just turn it off.
Leave a Reply