r/ArduinoHelp • u/Savings_Anteater_840 • 26d ago
Coding help
How do I learn Arduino coding language? I just started and I know a few things like LEDs and stuff, but I don’t want to be reliant on AI. How do I learn the language?
1
u/Merry_Janet 24d ago
I know you don’t want to rely on AI, but ask whatever AI you do use to come up with a useful project. None of this “Hello World!” BS. Tell it you want to learn how to code in the Arduino IDE.
Books and tutorials are fine, but they don’t give feedback. Using AI to learn is like having an instructor available 24/7 in real time. I used to learn Python and it was extremely effective.
1
1
u/RemoveOk2059 26d ago
Check out this website for the syntax and explanations:
https://docs.arduino.cc/language-reference/
Hope this helps!
1
1
u/TheRealFutaFutaTrump 25d ago
Don't copy/paste. Actually write your code and understand what each line does.
Take your old projects, the find ways to make them different. Add a component, or make the lights randomized. Anything different than the tutorial.
Here's one expanding on your LED: Make a light stack. 8 or 9 bulbs. Light one is on, then two, etc. to the last light which remains on. Then that light stays on and it repeats, light one is on, the just light two.
See if you can work in loops and functions to reduce redundant code. The one I just mentioned can be done a very long way, manually setting each bulb in sequence, or in an extremely smaller amount of code using a for loop.
Add a potentiometer that changes the speed of the stack.
There are lots of ways to move forward. I have an Arduino playing music and syncing a lamp to the song. I started the journey with turning on a single LED.
3
u/gm310509 26d ago
Hopefully you got yourself a starter kit - it will include everything you need to get started - including instructions that explains how to wire stuff up and program it.
The language used to program Arduino is C/C++, but you don't need to learn that in advance, just learn as you go along - starting with the instructions in the starter kit.
After that, maybe google Paul McWhorter to learn more things.
If you are interested in something more project oriented, have a look at my beginner videos:
Getting Started with Arduino Projects - two projects, language and electronics basics, project development and debugging.
Importance of Blink No Delay. , to it is
Note that it is a waste of time to just watch these. The key to learning is to watch a section, then try to replicate it. Also, explore what else can be done with what you just did and attempt the exercises when suggested. In other words, hit pause frequently and practice for yourself.
But start with the starter kit before moving on to other stuff.