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. ...

Get Learning C for Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.