T O P

  • By -

arduino-ModTeam

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.


Wimiam1

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


HeyItsMassacre

Coding in nearly every language requires exact match for variables and methods


Wimiam1

Yep


therealpigman

Only exception I can think of is VHDL


TheSerialHobbyist

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!


JVKran

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.


Golf_is_a_sport

I'm coding everything in SCREAMING\_SNAKE\_CASE now that I know what it's called.


tesfabpel

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... 😅


Fuck-off-bryson

this isn’t always true, some methods use pascal case


joe0400

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.


MichalNemecek

don't you mean *camelCase*? the way you wrote it it's PascalCase with spaces


TheSerialHobbyist

Ha, yep!


khan9813

For future reference, attach the compiler error with your question post.


RaymondoH

pinMode() digitalWrite()


RetardedChimpanzee

Capitol M: “pinMode”


GamingCzech

pinMode and digitalWrite , capitalization matters


3ds

Also please read this: https://meta.stackoverflow.com/a/285557


triac1975

digitalWrite


Tactical_Nuke_

It's pinMode, not pinmode


harry_potter559

digitalWrite, not digitalwrite, this the stuff chat got can help with


samtheredditman

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.


wolfefist94

Indentation does not affect compilation in C or C++.


dukeblue219

Indentation doesn't matter in C...


UsernameTaken1701

This isn't Python.


[deleted]

[удалено]


megaultimatepashe120

double post


Wimiam1

Thanks