Running a sketch on Arduino Nano and Raspberry Pi Pico
In this recipe, we will blink the Arduino Nano and Raspberry Pi Pico LED using the Blink prebuilt example from Arduino Web Editor.
This "Hello World" program consists of a simple LED blinking through the GPIO peripheral; from there, we will be able to go anywhere.
This exercise aims to get you familiar with Arduino Web Editor and help you to understand how to develop a program with Arduino.
Getting ready
An Arduino sketch consists of two functions, setup()
and loop()
, as shown in the following code block:
void setup() { } void loop() { }
setup()
is the first function executed by the program when we press the reset button or power up the board. This function is executed only once and is generally responsible for initializing variables and peripherals.
After setup()
, the program executes loop()
, which runs iteratively and forever, as shown in the following figure: