Hello Arduino!
Let's write our first program on the Arduino IDE. Go to FileÂ
and click New
. A text editor will open with a few lines of code. Delete those lines first. Then, on the editor section, type the following code. Don't worry, the code will be explained later:
void setup() { Serial.begin(9600); } void loop() { Serial.print("Hello Arduino!\n"); }
From the menu, go to Sketch
and click Upload
. It is a good practice to verify/compile the code before uploading it to the Arduino board. There will be a prompt to save the code on your system. Just give it any name you want and save it. To verify/compile the code, you need to go to Sketch
and click Verify/Compile
. You will see the message Done
CompilingÂ
on the bottom of the IDE if the code is error-free. See the following screenshot:
After the successful upload, you need to open the Serial Monitor of the Arduino IDE. To open the Serial Monitor, you need to go to ToolsÂ
and click Serial
Monitor...