Beginner guide for programming the arduino

Next week on Saturday will be our academic year end, that's why i want to learn the basics of programming the arduino alone until i master it so i can work on my future prototypes/projects independently, know the different functions of each codes. after that i also want to learn the functions of components (such as sensors, lcd, etc.) and how to program to program them

Good idea :slight_smile:

Don’t cut corners there - investing time in having a good grasp on the C++ language and basics of electronics is going a long way.

there are tons of tutorials out there including on the Arduino's web site

To begin with, you don't have to learn most of C++ or even C to begin, but having links to C and C++ teaching sites and being willing to look up everything you're not sure of will make you better and save you time and frustration.

In the IDE there are Tutorial Examples that make sense once you know the Getting Started parts. Sections 1,2,3, and 5 cover essential beginner parts. Section 4 teaches C++ Strings that let you print and play with text but in the long run have caused many,many,many 'help me' threads on the forum here. My advice is to learn text using C style char arrays and not C Strings first. C++ Strings are easier if you have lots of RAM but on many Arduinos they are how to crash code that gets more than trivial, which is what the Section 4 Tutorials are.

Hey, good lessons are trivial to stay simple and easier to understand but when you only have a few K of RAM, avoid using String and all dynamic-allocation-based code.

Every Tutorial Example should have a link to the main Arduino site with more explanation and likely links there to compete or extend from there. Do the tutorials you can, some may require parts you don't have but even if you can't run them (and mess with the code to see what works and what doesn't) they may still show and tell good info.

how did your "defense" go?

seems like you should be beyond the basics by now and really need to at least understand the C. The C Programming Language provides a succinct description

our defense was amazing, we defended our study and also our prototype. i just want to say thank you to you and for the people how help me.

im also planning to improve our prototype in our next defense (next academic year '25-'26) like adding capacitive sensor and such

that's a lot of pages hahaha

i also have the arduino starter book i believe it just defines the functions of electrical components, and i think some database in it and circuit designs too, correct?

what did your professor like about your project? what did he question?

that's a project book. It's not going to fully explain a language, only demonstrate parts of a language

I would not recommend that book as an introduction to Arduino because so much of its content is not applicable to that platform ... putc(), getc(), studio.h, printf(), scanf(), main.c, a.out, etc. It also doesn't cover the very basic things a new Arduino programmer needs to know ... setup(), loop(), Serial.print() ....

those things can easily be ignored ... and are not part of the language

what Arduino book/web site fully covers the a language? And if you have a question about a language feature (e.g. loops, pointers, structs) what would you recommend?

This is a very good youtube series

seems to be more about cotnrolling hardware, not about a programming language

Here's your problem, from the epic thread of 343 posts.

You just don't seem to understand that you will be needing to read "a lot of pages", or watch hours of video, or sit in classes for weeks or months to learn how to do this stuff.

I'm happy you succeeded with your project, but I wonder if in defending it you had to demonstrate any actual understanding of what you managed to accomplished or what you were supposed to have learned.

Google is your friend. There are literally dozens of online organized courses of study dealing directly and exactly with the Arduino and how to use it to do things interfacing with real world components.

Start looking for any that seem to fit you current level of ignorance. We all have things we don't know, there's no shame in that. What you don't know could fill a book. There are probably 30 books you could pick from for Arduino Programming.

But balking at the idea of reading a book is not a good attitude. It is good that you inquire here, but there is no way to get around doing the work.

You could start by figuring out how the code you passed off as your own in your project works.

Another way to advance is to read these fora, and truly follow along on projects that look interesting and, again, fit well with your interests and current abilities.

And. Read. The. Code. When you don't know what something does Stop. Use it as a clue for how to focus your efforts.

a7

If I look up from where I'm sitting, I can't even see my copy because it's so slim compared to my other computing books. It is an excellent book.

However, it's terse and every word is important so perhaps something with more examples would suit you better.

You might try doing some C or C++ programming on your PC first. It'll make it easier to debug your efforts. Once you've mastered functions, you're probably set to move to Arduino where you will gnash your teeth over the loss of the debugger.

As others have said though, you will have to spend time to get skilled at this - there's a big difference between copying most of your code and having forum folks help with the rest :wink:

When I worked at IBM, we provided in class with books training. We expected a trainee would need 2 years of experience working alongside a programmer writing small self contained less important sections of code. Thats 2ys * 50 weeks * 40 hours or 4,000 hours. At that point they were either promoted to an associate programmer or let go. Most but not all spent another 3 years of increasing autonomy and responsibility where they would be promoted to a full programmer. Notice that is the oft quoted 10,000 hours figure to master almost any human activity. Many would stay at that level until retirement or a change in career usually into a non-professional admin job. A small number would get promoted to Seniour Programmer and in my shop in Canada of 300 2 got promoted to Staff Programmer. I was one of the two and achieved that rank in about 10 years. I left IBM about 2 years later for a position with National responsibilities.
So when I see/hear folks saying they can be a real programmer after a few weeks/months I either laugh or cry. In my personal opinion, until you can code in machine language and think assembler is a high level language then we have a different definition of 'real programmer'.

Why not just wire up a bunch of NAND gates to make a “Hello, World” program! Let’s get back to the basics—who needs abstraction when you can manually toggle flip-flops and handcraft binary instructions, right?

You only know WHAT to ignore if you already know the language.
So completely inapplicable for a beginner. You seem to contanly forget that you are a 3 decades experienced expert and what huge knowledge this means.

I want to mostly agree with you. Over the years I have worked with a lot of programmers.
Some should never have been called that,
Had the privilege of working with a few that learned in a very short rate of time and turned out some great products. But they were few and far between. A lot of it comes from how committed you are. One developed a data acquisition system that was sold to a Indy car team in the early 80's. He worked for a company building race cars. Before he started his venture on the side.

I trust you were joking. I only meant having that background gives you a better understanding about what is happening under the covers. I was frequently told that during my working days. I did start out in hardware by the way, back in the mid 60's professionally and late 50's in high school.

Does the name Leverton sound familiar?