Arduino Troubleshooting Guide
Arduino not working? Use this Arduino troubleshooting guide to diagnose and solve circuit, code, and connection issues.

Troubleshooting an Arduino Project
If you are working on an electronics or robotics project with Arduino and running into a problem, the problem may be related to the circuit, the connection between the Arduino and the computer, or the code you are using.
Solving a problem with an Arduino project requires troubleshooting! This step-by-step troubleshooting guide will help you learn how to find and fix common Arduino project errors in your circuit, code, or connections.
Identify the Problem
What exactly is happening? The first step in troubleshooting is to be clear about what you are observing or experiencing. Simply saying, "It doesn't work" isn't enough to help you (or someone helping you) effectively troubleshoot.
Ask yourself these questions:
- What did I expect to happen?
- What is happening? What am I observing?
- What error, if any, am I receiving on the screen?
Being clear about the answers to these questions can help you narrow in more quickly on the problem and, hopefully, the solution, so you can get your project back on track and working.
Troubleshoot Your Arduino Project
- Review the basics
- Confirm the Arduino is working
- Check the board selection
- Troubleshoot connection problems
- Save the file
- Check the serial monitor output
- Check for general coding errors
- Check the circuit wiring
- Get expert assistance
Review the Basics
Taking a bit of time to learn or review the basics can help you avoid common problems and more easily identify them when something isn't working the way you expect.
- Watch the introductory videos in the Arduino tutorial series. If you are new to working with Arduino, we recommend that you go through the first three videos in the How to Use an Arduino tutorial before starting your project. If you have not done that and are having trouble, we suggest you stop and watch those videos now. They cover important information you will need as a foundation for your Arduino STEM project. Even if you have previous experience with circuits and robotics, adding the Arduino microcontroller and a program (coding) brings new levels of complexity.
- Watch any additional videos related to your project. If you are working on a project that uses a specific type of sensor or part in the circuit, we suggest also watching any relevant videos about that sensor or part before starting or as a first step in troubleshooting. These videos are usually included or referenced in the project directions, but you can also browse the full set of tutorial videos. (You may also want to bookmark the Arduino tutorial playlist on YouTube.)
- Watch the breadboard tutorial. If you haven't used a breadboard before, we recommend watching the How to Use a Breadboard video.
Is the Arduino Working?
If something is going wrong, you need to first confirm that the Arduino has power and is working.
One way to make sure the Arduino works is to disconnect all external wires/circuits from the Arduino and run the basic "Blink" example code (Files > Examples > Basics > Blink). (Tip! This is covered in Video 1 of the How to Use an Arduino tutorial.) The "Blink" program simply blinks the onboard LED on and off. If this program works, then you know your Arduino is functional and properly connected to your computer.
Check the Board Selection
If you cannot get the Blink example code to run, you need to make sure your Arduino is communicating with your computer.
- Make sure the Arduino is connected to the computer (plugged in) with a USB cable.
- Make sure the Arduino board is selected in the Arduino Integrated Development Environment (IDE), the software you use to write Arduino programs and upload them to your Arduino:
- Use the dropdown menu to select the board in the Arduino IDE, as shown below. (Both the board and the port will be listed. On Windows, the port will be a COM port; on Mac, it will be something like cu.usb. Note: In older versions of the IDE, these settings are accessed via the "Tools > Port" and "Tools > Board" menus.)

- If the Arduino doesn't show up in the dropdown menu, it is not being detected. (If the Arduino is not being detected, the program you create can't be uploaded to the Arduino, and your project will not work.)
Note: This troubleshooting guide references the Arduino IDE when talking about the interface that you use to write your code and upload it to the Arduino. Whether you have installed the desktop version or are using the cloud-based version, you will need to check or do the things noted. Depending on the version you are using, please be aware that there may be some differences in the interface, including the location of appearance of various tools.
Troubleshoot Connection Issues
If your Arduino is not being detected by the Arduino IDE (on your computer), make sure the connection between the computer and the Arduino is working. Here is a list of things to check or try:
- Make sure the Arduino board is powered on (power LED lit).
- Make sure the board is properly selected in the dropdown or under Tools > Port in the Arduino IDE. (See above.)
- Make sure the USB cable is fully plugged in.
- Try unplugging the USB cable and plugging it in again.
- Try a different USB cable.
- Try a different USB port. (If you are using a USB hub, try connecting the USB cable directly to your computer instead.)
- Double-press the reset button on the Arduino board, wait for the onboard LED to blink, and check again to see if the board is recognized (or try uploading the code again).
- Check for short circuits. A short circuit on the breadboard can create USB issues, especially if there is anything connected to Arduino pins 0 and 1 (RX and TX). If you are not sure whether you have a short circuit, completely disconnect all external wires from your Arduino until you resolve your connection issues. If you see or smell smoke, or your circuit feels hot, you have a short circuit somewhere and should immediately disconnect the USB cable and any batteries from your circuit. (Note: Short circuits may not always result in obvious damage to your circuit.)
- Make sure there are no loose resistors, wires, or other parts under the Arduino, as these could cause short circuits.
- Make sure the exposed back of the Arduino is sitting on an insulating surface and isn't touching anything metal or liquid.
- If possible, try using the Arduino with a different computer. This helps determine whether the problem is with the computer or the Arduino.
- Reinstall the Arduino IDE.
If your Arduino is being recognized by your computer, and you are still having a problem with your project, you will need to continue troubleshooting to determine if the problem is with the code or with the circuit.
Make Sure to "Save" and "Upload" Your Code
Did you save your code? Did you upload it to the Arduino? Both of these steps are important! If you made any changes to your code, you need to make sure you save the code. You also have to make sure to upload the code to the Arduino.
If you downloaded and installed the desktop version of the Arduino IDE, you will need to manually save your code by selecting File > Save from the menu at the top. When using the desktop software, it will not auto-save like Google Docs or other cloud programs. If you close and re-open the Arduino IDE without saving first, you will have to re-enter the code (and any changes you made) when you open the software again to work on your project.
Note: If you are using Arduino Cloud, your work in the Cloud Editor will be automatically saved.
Once you have saved your program, the next time you launch the IDE, you can select File > Open and navigate to wherever you saved the code (it will be a file with a ".ino" extension) on your computer.
To send your program to your Arduino, click the "arrow" to upload.

Note: If using Arduino Cloud, you may need to download and install a plugin to be able to upload your code from Arduino Cloud to your board. Follow the instructions in the editor.
Check the Serial Monitor Output
When enabled, the serial monitor allows you to see data from your Arduino in real time. Exactly what is displayed in the serial monitor will depend on the project, but it is frequently used to display a measurement from a sensor. This measurement should change when the input to the sensor changes. If the reading is always zero, or remains constant even when you change the input to the sensor, then something may be wrong with your circuit.
Does the project's code include output to the serial monitor? If so, what is displayed in the serial monitor? Checking the serial monitor can help you confirm whether or not your circuit is working properly.
How do you do this? Look at your code to see if it contains Serial.begin and Serial.print commands. These commands may be commented out by default, meaning they will not run, so you need to uncomment them to print to the serial monitor. For example, the code shown below notes that you can uncomment the Serial.begin line to help with debugging:

To uncomment something in a program you are working on in the Arduino IDE, remove the // marks, save the file, and re-upload. (Note: In this example, the code contains several lines that need to be uncommented for troubleshooting (not just the one shown here), so be sure to carefully look through your code.)
Select Tools/Serial monitor to open the serial monitor and view its output.

Now that you have made the serial monitor output visible, what does the serial monitor show? If the serial monitor output shows a sensor reading, does the reading change when you change the input to the sensor, for example, if you hold your hand over a light sensor? In the image below, the serial monitor shows readings that are changing.

If the serial monitor always shows all zeroes, as in the image below, or the reading remains constant even when you change the input to the sensor, it most likely means that something in your circuit is not connected properly. Double-check the circuit diagram in the project to make sure your sensor is connected properly.

Check for General Coding Issues
Are you seeing a compilation error when you run your program, or is it simply not working as expected? This is an important detail. If you are seeing an error on the screen, that information will be important in helping you debug your program. If the program simply isn't doing what you expect, you will need to check all aspects of your code and circuit to find the problem.
Did you make any changes to the starter/sample code that was provided in the project? If you are doing a project from Science Buddies, and you didn't make any changes, and you are sure you saved and uploaded the program, then the problem is likely not a coding problem. (It is more likely a connection issue. See the troubleshooting steps above.)
Both syntax errors and other coding problems will show up as "compilation errors" when you try to upload the code. Information about the error will be shown in the output window. As you can see from the image below, the error is identified multiple times in the "Output" window, and the relevant section of code is highlighted to help you pinpoint the location of the problem.

Here are some common coding and syntax errors to be aware of:
- Semicolons: Every programming statement in an Arduino program must end with a semicolon (;) to mark the end of the statement. This doesn't mean you need a semicolon at the end of every "line" on the screen. A statement is a complete instruction. A single statement may use more than one line. Also, lines that define a block (or group of instructions), like
iforelse, do not use a semicolon.This example, has statements that end with semicolons and
loopandifandelseblocks that do not:

- Mismatched/missing brackets: Certain parts of an Arduino program must be surrounded by curly brackets, { }, or parentheses, ( ). Open and close parentheses or brackets need to be matched. Make sure you aren't missing any opening or closing parentheses or brackets.

- Capitalization: Arduino programs are case-sensitive. This means that you need to be careful about how you capitalize functions, classes, variables, etc. Some built-in words are case-specific. This can be confusing at first, so be sure to check your capitalization. For example, Serial.begin(), which uses the Serial class, begins with a capital S. Serial.begin() is not the same as serial.begin() or serial.Begin(). Multi-word functions, on the other hand, often use a capital for the first letter of the second word. For example, digitalWrite() and digitalRead() are built-in functions. Writing them differently, as Digital.write() and Digital.Read(), for example, would cause an error.
- Malformed comments: A comment in an Arduino program can be marked in two ways, as a block or multi-line comment (using /* comment text here */ ) or as a single-line comment (using //). Be careful to ensure that block comments are closed properly.
- "Variable_name was not declared in this scope": This happens when you forget to declare (or define) a variable before its first use. This is required in Arduino, even though it isn't required in some other programming languages. (If using starter code provided by Science Buddies, the variables are already declared.)
- Problems with conditional statements: If you have written your own if/else statements, ensure they are formatted properly, including the closing brace. For example, in the code shown below, there are three sets of matching opening/closing braces ({ }):

- Problems with the core program structure: All Arduino programs require setup and loop functions. The basic structure of a program requires at least the following:

- Mismatched quotation marks: Make sure that any text values wrapped in " " marks contain both the opening and closing quotation marks. (This is something to check if you are using single quotation marks (' '), too.)

- Formatting issues: Be careful when copy/pasting code from other documents, PDF files, or web browsers. Hidden formatting or invisible characters may cause errors in your code. It is safest to type the code directly into the editor, or paste the code into a plain-text editor to remove any formatting before pasting it into the IDE.
- Typos: When looking for errors in your code, carefully check for typos or misspellings of variable or function names that may cause a problem.
For more information about programming in Arduino, see: Arduino Language Reference.
Additional Errors
If you are seeing an on-screen error, then you need to focus your troubleshooting on understanding and fixing that error. This may require searching online for more information about the error.
Here are some other common errors that you may encounter:
- DFU error: A DFU (or dfu-util) error usually means the Arduino software can't communicate with your board while trying to upload or update firmware. This is often caused by selecting the wrong board or a problem with the USB cable. For more information about this error, see this Arduino resource. Note: DFU errors may commonly appear with "exit status 74," but other things can also cause "exit status 74" errors. In the first image shown below, the wrong board has been selected. In the second image, the USB cable has not been plugged in properly.


- avrdude: This error is often related to the board selection. For more information about this error, see this Arduino resource. In the image shown below, the board has not been properly selected.

Check the Circuit Wiring
Even one misplaced element in a circuit can cause the circuit to not work properly. If your project is not working, it is important to go back through, step by step, and double check that all of your wires on the breadboard match the wiring diagram in the project.
Depending on the difficulty of the project, you may have been given a slideshow or illustration showing the placement of each part. For more advanced projects, you will generally only see a circuit diagram. Advanced projects assume you have experience with circuits and will be able to follow the diagram.
Sometimes it is possible to test individual components of your circuit hardware without relying on code. For example, you can connect an LED (with a current-limiting resistor) directly to the Arduino's 5V pin instead of using a digital pin to blink it on and off. This will help you confirm that the LED is working. For some sensors, you can use a multimeter or an oscilloscope to measure their output directly instead of relying on the Arduino digitalRead and analogRead functions. This can help confirm that your sensors are working properly.
It is especially important to understand how the holes in a breadboard are connected. Refer to the How to Use a Breadboard tutorial, as needed. You may also want to review the Common mistakes and troubleshooting section.
Get Help at Ask an Expert
If you are still having trouble, you can post for assistance in the Ask an Expert forums. Be sure to identify which project you are doing (include the URL), what troubleshooting steps you have taken, and any changes you have made to the code. You will most likely be asked to upload a few close-up and clear photos of your circuit, as close as possible and looking straight down at the circuit so that the elements can be seen. Make sure your circuit is as neat as possible. Sometimes tall parts and long wires can hide connections from view, so you may need to take multiple photos from slightly different angles.
When posting at Ask an Expert for assistance, be sure to note or include:
- Which project you are doing (include the URL)
- What is happening (and what you expected)
- Any specific error you are receiving in the Arduino IDE
- Whether or not you made any changes to the provided code (If you made changes, provide a screenshot showing the changes.)
- Well-lit, in-focus pictures of your circuit






