I need some help with this error code

i need some help with this error code if anyone help that would be great.

http://www.catb.org/~esr/faqs/smart-questions.html#bespecific

Do not simply hit reply to a list message in order to start an entirely new thread. This will limit your audience.

Please don't hijack threads @gameman . I have split your post out to its own topic.

Hijacking is against the Arduino forum rules. The reason is that it may sidetrack the discussion, even preventing the creator of the topic from getting the assistance they need. It also reduces your own chances of getting assistance.

This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

You might first try naming your sketch and saving it.

i just did that and the error code is still up

Hi @gameman. I'm going to ask you to provide the full output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select Sketch > Verify/Compile from the Arduino IDE menus.
  2. Wait for the compilation to fail.
  3. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the <CODE/> 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 icon on toolbar
  6. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  7. Move the cursor outside of the code block markup before you add any additional text to your reply.
  8. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

1 Like

suggests:

Your code doesn't look like C:

image

If you post your code correctly using code tags, or even make a Wokwi of your project so others can duplicate your error, you'd get closer to the solution.

Also, you might check what i suspect is a typographical error in for(counter = 0; counter < numAaverage; counter++) (numAaverage ? Is it globally defined with that same spelling? Most folks would probably have numAverage unless you also have maybe numBaverage, numCaverage and so on)

and fix the commenting error that carries over to line 35. In other words, backspace assigned to sensorValue on line 35 so it's properly on the same line of the comment

// read sensorpin value

at the end of line 34.

1 Like

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