#include giving me errors

I have a Nano motor carrier and I am trying to program for it but when I try to include the Arduino motor carrier library it gives me an error. Even with this one line #include <ArduinoMotorCarrier.h>
it gives me a compiling error. I have already downloaded in my libraries folder. The error says "Error compiling for board Arduino Nano." Any help would be appreciated.

It's in line 43 of your code.

Without your sketch I don't think we can help.

My guess is that the library is not properly installed. A version for the MKR and Nano boards is available through the IDE library manager. That is the best way to install any library.

Read the forum guidelines. Post your code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

@econjack @ToddL1962 #include <ArduinoMotorCarrier.h> is the only code. @groundFungus I did install the library from the IDE library manager. And are you saying autoformat in the post or the code or what?

What Nano board are you using, and what have you selected in the ide?

Then you are missing the setup() and loop() functions? Do you know what is the minimum code for an Arduino sketch?

To autoformat the code, place the cursor anywhere in the code and hit ctrl-T (Windows) or go to the Tools menu and choose Auto Format. That will indent the code in a standard manner making the code much easier to read and follow.

Is your board a MKR and Nano IOT 33 board?

There is surely much more to the error than that. You need to read the contents of the black console pane at the bottom of the Arduino IDE window to get the detailed information about what went wrong.

You should also always post the full and exact error output when asking for assistance with a problem here on the forum.

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V. This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.