keep getting this error. can someone figure this out so i can upload this code to my arduino uno rev 3
Learn the rules for posting code and errors. Also declare A.
I'm really new to this. I apologize if I missed on the rules. What does declare A mean?? Excuse me for my lack of experience
You need to post the error report.
After you learn the code posting rules, someone will be happy to tell you more about your error. You can't learn if we do all the work.
Listen railroader this is Chinese to me. I am mechanical and smart but I didn't know what Arduino was a week ago. I know y'all are smart for sure that's the reason I tried using this help forum. But the arrogance of a blfee people on here is a complete turn off. I appreciate you trying to help but I will try to figure this out another way.
Hi!
I can see that this is your second post and in the first one (https://forum.arduino.cc/t/arduino-uno-configured-to-syren-50) you were not invited to take a look at the famous How to get the best out of this Forum link.
I suggest you to read the link above, where you´ll see how to post your sketch and error codes correctly, which will certainly grab the attention of other members of the forum and make it easier for everyone to help you.
The problem that generates the error you posted is the fact that "A" is not defined anywhere. Most probably you copied or edited the code and forgot another letter. "A0" was probably the correct choice (it is the analog pin A0 of the Arduino).
I can see other problems in your code, but as you have just started and decided to learn it yourself, let´s go each point at a time.
Read the topic and try again!
I rarely do hand holding, but I will make an exception for you.
The error (highlighted in pink/red) is you are missing the number after A. Look on your board where you have the pot connected and you will see A# OR A##. Change the A to that.
Every forum has certain rules, and you broke one. Just read the FAQ, in the future post both code and error logs in code tags. There are several ways of doing that but the easiest is to just click the Icon above and paste your code between the
and
like below.
type or paste code here
I don't see any arrogance.
Brazilian you are correct I added the 0 after A and it took me to an error on motor speed pot value. So I guess there's several problems with this code.
I'm not trying to be difficult. I'm just out of my element
Understood.
If you want to continue, Post the version of the code and it's associated error(s). Use a for the code, and ALSO for the errors. You can copy the errors using the COPY ERROR MESSAGES lower right. See pic.
Does that help you move forward?
It appears you want to do something with motors of some sort. You are probably using a library. Look at some/all of the library examples and read the code and make notes to get a basic understanding. Pick the example closest to what you want to do and make a copy then start modifying it. I have 50+ years experience with code and still do that quite a bit. Here is how you find the samples (2 ways)
- Using the Library search bar find the library you are using, click the 3 dots (you have to move mouse to the entry) then click Examples (see pic)
The other way(harder) is to peruse the File/Example etc, see 2nd pic.
Give that a try and get back to us.
Sad You feel like that. There is advice, for new members, like in "How to get the best out this forum." It tells the basic requests from forum.
If You use that advice You will get useful advice much faster. An incomplete post delays the process, uses more of Your time, and ours. Helpers need to spend time pulling out requested information. That's silly because it's already written, told.
Thanks for the he help
- look at the lower part of the screen th error is: 'A was not declared in this scope'
- look at the upper part of the screen the pink line you have: potPin = A; ( as said before A is undefined, define the pin number 'in numbers' )
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.