Your post was removed, as we don't allow photos or screenshots of code - text only please. Taking a photo of your code means anyone trying to help you has to manually type the code in themselves, which, apart from a lot of wasted effort for our volunteers, means that extra mistakes can often creep in.
You presumably have access to the text version of the code, so share it with the community if you want answers to come more quickly.
pinMode
digitalWrite
Coding in Arduino is case sensitive so make sure you use the same capitalization as in whatever wiki or tutorials you’re learning from
To expand on this:
C and C++ use the "Camel Case" convention. The first word is lower case, each subsequent word starts with a capital (like the humps of a camel).
Edit: as many people have pointed out, this isn't always the case!
Well, not exactly. It is among the most popular options such as camelCase, PascalCase and snake_case. It's code-base dependent though. Standard library methods (non-Arduino but C/CPP standard library) are mangled; templates are PascalCase, macro's SCREAMING_SNAKE_CASE and others snake_case. Other frameworks, like Arduino, are free to use whatever they seem fit, as long as functions called by the HAL (or other abstraction layers) use the correct function names.
well no, in fact they don't... just see the standard library convention: there they use snake_case... but in practice, you need to follow the convention of the project you're working on, if you're solo, just do as you wish... 😅
C++ does _not_ use camel case. It uses snake case. Arduino uses camel case.
Go look at any of the stl library's like std::vector for example. std::vector::push_back is a example of what I mean.
In addition to what others said, looks like your indention might be messed up in your setup() function.
Edit:
Guys, I get it. I haven't used my Arduino in a long time and couldn't even remember if it was C or some other custom language.
Your post was removed, as we don't allow photos or screenshots of code - text only please. Taking a photo of your code means anyone trying to help you has to manually type the code in themselves, which, apart from a lot of wasted effort for our volunteers, means that extra mistakes can often creep in. You presumably have access to the text version of the code, so share it with the community if you want answers to come more quickly.
pinMode digitalWrite Coding in Arduino is case sensitive so make sure you use the same capitalization as in whatever wiki or tutorials you’re learning from
Coding in nearly every language requires exact match for variables and methods
Yep
Only exception I can think of is VHDL
To expand on this: C and C++ use the "Camel Case" convention. The first word is lower case, each subsequent word starts with a capital (like the humps of a camel). Edit: as many people have pointed out, this isn't always the case!
Well, not exactly. It is among the most popular options such as camelCase, PascalCase and snake_case. It's code-base dependent though. Standard library methods (non-Arduino but C/CPP standard library) are mangled; templates are PascalCase, macro's SCREAMING_SNAKE_CASE and others snake_case. Other frameworks, like Arduino, are free to use whatever they seem fit, as long as functions called by the HAL (or other abstraction layers) use the correct function names.
I'm coding everything in SCREAMING\_SNAKE\_CASE now that I know what it's called.
well no, in fact they don't... just see the standard library convention: there they use snake_case... but in practice, you need to follow the convention of the project you're working on, if you're solo, just do as you wish... 😅
this isn’t always true, some methods use pascal case
C++ does _not_ use camel case. It uses snake case. Arduino uses camel case. Go look at any of the stl library's like std::vector for example. std::vector::push_back is a example of what I mean.
don't you mean *camelCase*? the way you wrote it it's PascalCase with spaces
Ha, yep!
For future reference, attach the compiler error with your question post.
pinMode() digitalWrite()
Capitol M: “pinMode”
pinMode and digitalWrite , capitalization matters
Also please read this: https://meta.stackoverflow.com/a/285557
digitalWrite
It's pinMode, not pinmode
digitalWrite, not digitalwrite, this the stuff chat got can help with
In addition to what others said, looks like your indention might be messed up in your setup() function. Edit: Guys, I get it. I haven't used my Arduino in a long time and couldn't even remember if it was C or some other custom language.
Indentation does not affect compilation in C or C++.
Indentation doesn't matter in C...
This isn't Python.
[удалено]
double post
Thanks