I decided to buy some Arduino stuff to do as a hobby and I need help learning it. I know YouTube has tutorials, but they make it make no sense. Can some people please help me learn the language.
- Welcome to the group.
- What have you done with hardware and software in the passed ?
- Here is a place to start.
In the past I have built things from a kit I bought but it never told me what anything did very well all it said was just put this here and that there the copy and paste this code
Hello coolgamer5562
My tip:
Think of a project that fits in with your hobby, e.g. model railroad, flower growing or similar, and describe it.
Start with a block diagram that contains all the components and describes the physical interfaces.
Now the function modules can be programmed and tested.
May I suggest a starter kit with a lesson plan for learning how to use Arduino and electronics?
Do you want to know/practice for yoursef using Arduino UNO how to add two decimal numbers like (12 and 13) and then displaying the result 25 on two cc-ype 7-segemnt display unit (Fig-1, 2)?
In this example, you will see very step-by-step why and how hardaware components and software codes are coming one-after-another.
Figure-1:
Figure-2:
For example:
1. A 7-segment display device (in fact it is 8-segment including dp), there are 8 segemnts. The cc-teriminals of all those segments are tied together and the name is gven COM or GND (my given name is: cc for common cathode).
2. To turn on segment-a, you need to connect a series resistor (called current limiting resistor) with it and then apply Logic High (3V to 5V) at the other end of resistor. Apply 0V (GND) at the COM/GND?cc-pin of the device. Check that segemnt-a has turned on.
Without a current limiting resistor in place, the LED gets just burnt out when Logic High (5V) volt is applied across it.
A LED emits good amount of light when about 10-15 mA current is passed through it. At this time, the voltage drop across the LED is about 2.5V.
3. Now, Let us carry out the task of Step-2 (turning on segemnet-a) using Arduino UNO.
... pending.
Is this not a system lavel project -- when the OP is just a learner?
Hello my Forum friend
It is extremely wise to always look at the project from the top level.
Software is good, but not everything for the project to work.
Quoting from AE:
A wise man always starts from basic (simple and elementary) and then gradually moves to the complex one.
So, is it Top-to-Bottom or Bottom-to-Top -- which path to follow?
Take an example that comes with the IDE; e.g. blink. It contains a few function calls like calls to pinMode, digitalWrite and delay.
Head over to the Arduino Reference and look them up to see how they work.
Take another example and repeat.
There is also a section about the structure of a sketch: https://docs.arduino.cc/language-reference/#structure
Then if there is anything you don't understand after you have done those steps feel free to ask the forum for help.
In addition to printed documentation, online resources, books, websites, videos, and forums... an AI can also be very useful for learning and getting things explained, as long as it's not used just to have things done without understanding them.
But especially at the beginning, it's much better to make a personal effort to understand the basics, because all the answers you find in books, forums, or even from AI still need to be understood and evaluated to see whether they're correct or not.
Learn and do
or
Do and learn
Which one?
There is no end of learning.
Start with doing sometimg (say turning on a LED using Arduino UNO), write the queries that come in your mind while turning on the LED, and put the queries to the Forum or look for yourself in the net for answers. Doing so, you will be doubly benefitted -- doing and learning at the same.
The Simon Monk book “getting started with sketches” I found very useful when starting out .
Sometimes, when things aren't working, it can be useful to lift a piece of code from a textbook, get it running and restore your confidence.
Then look at how it works.
I've been pleasantly surprised at some of the AI code suggestions and more than once it's helped when I hit the buffers.
Yes, it would be nice to be fluent in code and get your head around complex logic, but sometimes you don't have the time or resources to do it from scratch.
True, but if you do something as a hobby, you have all the time you want An AI, like a forum or a website, can guide you in the right direction or suggest what to do or which topics to address.
For a beginner, how good it is to ask ChatGPT to provide for a code to set the direction of DPin-8 as output? Does OP know what is DPin-8 and what is its purpose.
That's why OP has wanted to grasp the basics -- the following diagram (Fig-1) may help him.
Figure-1:
Correction Note: AGND and DGND are internally short in the chip/MCU.
Why confuse the issue? A good discussion of what this excellent Arduino reference image is telling the beginner would be more enlightening, in my view. I deliberately embedded, rather than linking, for image comparison. Scroll up, scroll down, zoom in.
For an ebook how-to, beginners can benefit from Michael Margolis’ Arduino Cookbook, available from locations online in pdf form, or you can check libraries in your area.