Skip to content

How-to / Arduino

Upload a sketch with Arduino IDE 2.0

Connect your Arduino board and upload your first sketch using Arduino IDE 2.0. Learn the difference between verify and upload, and how to select the right board.

BeginnerProgramming basicsBy Vilros

Verify vs. Upload

Arduino IDE 2.0 provides two main tools for working with sketches: verify and upload. The verify tool checks your code for errors and compiles it without uploading to the board. The upload tool does the same verification and compilation, but when it finishes successfully, it also uploads the compiled code to your connected Arduino board.

Use verify when you want to check for errors without affecting the board's current program. Use upload when you're ready to run your code on the board.

Upload a sketch

  1. Open Arduino IDE 2.0 on your computer.

  2. At the very left of the top navigation bar, you'll see two icons: a checkmark (verify) and an arrow pointing right (upload).

  3. First, click the verify tool (checkmark) to compile your sketch. Even an empty sketch will compile successfully. After a few seconds, the console (black box at the bottom) will show the result of the compilation.

  4. Before you can upload code to your board, you must select it. Navigate to Tools → Port → {Board}. Your connected board(s) should appear in this menu. Click to select your board.

    Board not appearing?

    If your board doesn't show up in the Port menu, check that it's properly connected via USB, try a different USB cable, and ensure any required drivers are installed for your operating system. Some Arduino boards may require additional driver installation on Windows.

  5. With your board selected, click the upload button (arrow). The IDE will compile the sketch and upload it to your board.

  6. When the upload finishes, the console will display a success message. If errors occur during upload, they'll be listed in the console as well.

Troubleshooting

  • Compilation errors: Read the error messages in the console carefully. They'll point to the line number and type of error in your code. Common issues include missing semicolons, undefined variables, or incorrect function calls.
  • Upload errors: If compilation succeeds but upload fails, verify that you've selected the correct port and board type. Try disconnecting and reconnecting the board, or closing and reopening the IDE.
  • Port access denied: On Linux and macOS, you may need appropriate permissions to access the serial port. On Linux, add your user to the dialout group. On macOS, check System Settings for any security prompts.
  • Wrong board selected: If your sketch uploads but doesn't run correctly, you may have selected the wrong board type. Go back to Tools → Board and choose the exact model you're using.

If it doesn't work

  • Confirm your Arduino board is connected via a working USB cable that supports data transfer (not just power).
  • Verify you've selected the correct board and port in the Tools menu.
  • Check the console output for specific error messages.
  • Try a different USB port or cable.
  • Restart Arduino IDE 2.0 and reconnect the board.

Need help with your Arduino setup?

Tell us your Arduino board model, operating system, and the error messages you're seeing.

Contact Vilros Support ↗