Please, help me out here

Please, I just wanna ask. In Arduino, do you guys learn all the codes raw, or do you just understand concepts, and when you want to do a project, you sometimes get the code from online or built-in examples, and edit control structures and commands?

Or do you in actuality, know how to write all the codes from your head?

If so, was it at your early stages you learnt them? or was it by reason of experience and constant writing you got used to them? Please I wanna know how it went for you guys in this forum, how long have you been consistent for?

it's a process and depends on how you best work

I like concepts, so when I learn a new language I read about the language concepts, the grammar, the syntax and explore the libraries with small examples I write from scratch or sometimes looking at already written examples. I barely copy/paste.

Once I master the formal part, then I don't need the training wheels anymore and code "from my head" as you say.

The more languages you've been exposed too, the easier it gets as many concepts are shared across languages.

Some other people prefer to be hands on and busy right away and learn / discover through copy & paste. It has the advantage of "instant reward" and not spending days or weeks in concepts and baby code away from your "project".

I can't comment really on the merits of that second approach since I don't do that but I feel the latter is likely to get you to take wrong habits or miss out on key concepts because the code you read or copy from might not be great and you don't have the skills to assess that or you just don't take the time to understand inside out what's really happening in the line you just copied.

2 Likes

how long did it take you to learn a language?

Hello @bro_bubby

Like any person learning any task, the more you apply yourself, the better you become. Some people are "artists" (just like Motzart, Manny Pacquia, Julia Child, Sun Tzu) in Arduino arts, creating impressive projects.

I started learning programming before my school had classes in programming or the internet was an idea, by transcribing (old-style copy/paste) from hardware reference books, text books and magazines. When I corrected my typing errors (and there were many), I slowly understood how programming worked. This method is like learning how to make pizza by eating pizza.

I consider myself a "4 out of 10" not because I do not try, but because I have trouble understanding and implementing higher concepts of hardware, firmware and software, but I enjoy the field and learn every day. Similarly, I can make pizza, not because I learned high-level concepts of baking, but because I like to eat pizza and copied from a book until I made a pizza that I like, and hope you like it, too. It took me four Fridays to learn all my ingredients to make pizza without a book. I am still learning electronics and programming after many decades, so I use reference material all the time.

Whatever you choose to do, enjoy what you do, apply yourself, and you will excel.

1 Like

So I'd say if you are dedicated and serious about it, a couple weeks would get you going with

It's easier if you have also taken the time to be exposed to architectures of computers, language theory, boolean algebra, algorithms, compilation theory etc... but you don't need all this to get started.

I just enjoy having a good understanding of the concepts and underlying mathematical theories.

May be also one of the reason for reading a lot about theory and concepts before getting hands on was because at the time (in the 70s) I could only compile (Fortran, C) on a time shared system (and my compilation jobs were not top priority...).

The emergence of personal computers (or programmable calculators) at the end of the 70s helped a lot on that front and opened up new ways of learning by testing.

As anything in life, when going for something new, keep an open mind and be willing to embrace change.

1 Like

Thank you🙏🏾

Look for a "starter kit" that comes with an Arduino, additional components, and a book (or online documentation) that walks you through various learning projects.

...I can't recommend one because I already knew electronics, and some programming before I started with the Arduino.

So, I just read through the Arduino Language Reference and some of the Examples before jumping-into the 1st project I wanted to build.

+++++++++++++++++++
The two most important concepts in programming are conditional execution (if statements, etc.) and loops (doing something over-and-over, usually until some condition is reached).

One of the "tricks" is to write, test compile, and test-run small bits of code at a time. Nobody writes the whole program at once, unless it's a very simple program.

As beginner, you should start with a working program (or something like the Blink Example) and add one or two lines of code at a time (and take-out what you don't need). That's not as simple as it seems because the compiler has to see a "complete program" that "makes sense"... You can't just start at the top and work down... For example, if you delete the bottom-half of a program, it's not going to compile or run.

Error messages can be cryptic. Usually they point-to where the error is (or near where the error is) but the complier doesn't usually know what's really wrong. And sometimes one little mistake can result in many reported errors. If you've only added a couple of lines, you know where the error is.

I'm not a beginner but I don't program every day, so I just write a few lines at a time, testing as I go...

Take advantage of the Serial Monitor (as in the Analog Read Serial Example) to "print out", little messages (i.e. "Waiting for button press") or variable values so you can "see" what the program is doing. You can take-out or "comment-out" that part of the code once everything is working. It's very handy for debugging because the compiler only knows about syntax errors. It doesn't know what you're trying to do and it doesn't care if you're doing something illogical.

The full C++ language is HUGE and I don't think anybody knows it all... The only book that covers the entire Standard language is the ANSI/ISO language standard itself. And the standard language doesn't include anything Arduino related, or even the mouse, or graphics, or color (when programming for a computer) so all of that is added on-top of the standard language.

And for the Arduino there are additional libraries (some official and some 3rd-party) for LCD displays or other "special" hardware or functions.

You'll need to keep the language references handy. :wink:

(The Arduino can't the full standard language, because it expects an operating system, keyboard, standard monitor display, disc storage, etc. Most of the examples in a regular C++ programming book won't work on the Arduino.)

To me, this Arduino Forum was a Training Place first and then it appeared as a Learning Place. After few months, the Froum presented itself to me as a Training/Learning Place cocurrently.

From Training perspective, I was (and still looking) looking for a simple example/tutorial which was telling ---
1. Do it and you get this result,
2. Do it and you get this result, and
3. And so on...

From Learning perspective, I was exploring/studying the roles of the tasks of Step-1 for producing the result. It was not necessary that I was uderstanding everying. I just went to Step-2 and did the same thing as I did in Step-1. And so on...

My logic could be odd and negative apparently; but, it worked for me.

For example:
I have perchased an Arduino UNO. I want to program it to do some works for me.

What will I do now? Perhaps, I want to be sure that the Arduino is functional and to verify it I want to tell the Microcontroller (ATmega328P) of the UNO Board to blink the onboard LED (L) at 1-sec interval.

The Training/Learning Session begins for me...

Thanks a lot

I get, so you don't necessarily have to learn everything, you just have to be able to produce the results you want?

2 Likes

Thank you.
I found this helpful

Learning from simple examples is much easier than using the reference book.
Good tutorials are available at

@bro_bubby - On this web site, you can practice using the examples from @build_1971 with Arduino boards... and simulate a project (with loads of examples)

Thank you very much

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.