At the moment this is just a raw collection.
Not well formatted, not in a certain order just some keywords what I came across in the forumt
therefore in general discussion maybe later moved to introductional tutorials
Stuck in a while-loop: if the conditions defined for the while can not change to false
you are stuck
most common reasons:
no updating of the variables used in the while-condition
assigning by a single "=" instead of comparing with a double "=="
using delay (instead of non-bocking timing)
not learning the basics
not knowing how step-chains work
to small variable size
not using functions
J-M-L
June 22, 2022, 8:37pm
2
That's for me - I've no clue what this is
a couple more common ones
using = instead of ==
wrong nesting of compound statement ({} not well organised)
adding a extra semi colon after an if condition, like
if (condition) ;
doSomething();
1 Like
1). Index outside of array bounds - often in for loops by using <=. Example :
for (int x = 0; x <= MAX; x++)
myArray[x] = 0;
2). Not using arrays at all, and repeating lots of similar code.
3). Declaring variables inside a switch/case block.
4). Not turning on compiler warnings.
5). Not including the required library.
Tips and Traps by Nick Gammon
http://www.gammon.com.au/tips
LarryD
June 22, 2022, 11:05pm
7
Biting off more than can be chewed.
connecting GPS TX to Arduino TX and GPS RX to Arduino RX. who could get anything so intuitive wrong?
LarryD
June 22, 2022, 11:47pm
9
Big problem when we had DTE / DCE equipment and Nul modems . . .
Good old days.
Hey, I resemble that remark!
Not using enough print statements.
1 Like
Hitting the "coding keyboard" before doing enough (or even any) thinking, and not drawing some kind of flowchart of what you want to do.
Not bothering to try any of the examples in the IDE and elsewhere before diving into a project.
2 Likes
StefanL38:
to small variable size
Let me reiterate
Using int type with millis() as in
int t;
...
t = millis();
Also, falling into the "XY Problem" trap. Not a code bug, but a mind bug...
1 Like
Yeah I like that, and it goes to my one about Think first, Code second.
Using String objects on an Arduino with limited RAM.
Trying to power a servo from an Arduino.
1 Like
Doesn't everybody do this, like all the time?
Beginners almost always do. Experienced programmers have learned to embrace the wise words of Mr. Eastwood.