Notifications
Clear all

Where one can self-educate on understanding arduino.

24 Posts
9 Users
7 Likes
1,896 Views
(@ryano085)
Member
Joined: 4 years ago
Posts: 12
Topic starter  

Hi all

I have around 5 months experience (about the start of lockdown) in arduino programming. I have done a few of the simple kind of projetcs ie Blink LED, DHT on a 7 seg display, my most ambitious project has been making a Personel cooling fan PWM controlled via DHT11, displaying Temp, Hum & PWM % on a ST??77 (cant remember exact) and few other projects of similar skill level.

I love tinkering but feel i have hit a wall regarding learning. there is an abundance of early beginner learning available online also a lot of expert but very little late beginner learning i feel. i believe i hit a bot of a wall. i think the next thing i must do is learn the structure of sketches (libraries). i know how to use YT obviously and it has helped in the past but really want to know where you guys gain your knowledge any good site you visit? or even books.

i actually have the Arduino For dummies book, but i that is a prime example of early beginner --> expert learning lol

 

thanks guys  


   
Quote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@ryano085

Try Paul McWhorter.  He has an excellent series of lessons on building a 9-axis IMU.  26 lessons in all, some an hour long, but most in the 30 minute or less range.  Here is the link to his YouTube playlist for the lessons: 9-Axis IMU

He has plenty of other things that might interest you as well.  I'm currently working through his lessons on AI (Artificial Intelligence).  They are not Arduino based, but none the less very, very good lessons.

And by the way, Paul regards the DroneBot Workshop one of his all time favorite YouTube channels.

SteveG


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 117
 

Try building a simple robot with some steppers or dc motors with encoders along with some sensors so it doesn't run into things. Then be able to control it via radio using nrf2401 or 433Mhz boards.  You will learn a lot.  At the same time you should probably spend some of your time learning more about programming using the language you'll be using for your embedded programming projects like C or C++, Forth or python. At some point you want to be able to write code yourself and not rely on libraries. There is just so much out there to learn, probably too much.

What you build doesn't have to be professional. Heavy cardboard, hot glue, tape will take you far. Plus that stuff is inexpensive.

It is a fun journey, can be frustrating at times but just take it slow and focus on quality rather than rushing through things before you have a complete understanding of what your learning. No pressure, your not at work  🙂

 

 

 


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

I admittedly have an odd style of learning but I had the same problem. My solution was, as soon as I had the basic skills, I just went straight ahead and started building whatever I wanted. If I came to a point where I needed something solved, a quick google search(and mostly stack exchange) and I usually found what I needed and learned some new things. Many professionals use stack exchange and will be there looking for solutions to their problems as well. Never feel guilty for looking there.

 

I do really wish there was a place to go that dealt with higher level things. The internet is flooded with videos and articles that are really saying "look what I built and this is how to build it". Not much out there to explain how libraries work and pass their data, if that makes sense.


   
ReplyQuote
(@ryano085)
Member
Joined: 4 years ago
Posts: 12
Topic starter  

Thank you for your replies. i have seen some of Paul Mc before and he is excellent. i guess patience is what i need

 

🤐


   
ReplyQuote
jker
 jker
(@jker)
Member
Joined: 3 years ago
Posts: 82
 

If you've reached a certain level of beginner knowledge, you can either continue to tinker/hack together projects... or you can try to understand more of what is actually going on. The problem is that the well of knowledge here is VERY deep and you are almost certainly going to want to spend some time accomplishing something while you're learning.

I'm fairly strong on the programming side, but somewhat weak on the electronics side.  I found an online textbook on DC circuits and read through it, solving problems such as "finding Thevenin equivalents" and threw together piles of sample circuits, prodding around with my DSO138 "oscilloscope" (look it up to understand the quotes) to see what was happening, as well as buying yet another multimeter to watch how different portions of the circuit reacted when things changed. One of the more confusing aspects for me, at first, was the behavior of inductors, and since DC motors behave as inductors... understanding them is somewhat important.

 

A lot of people in this community seem to be comfortable with the electronics, but not so much with the programming. If you have mostly been playing around with the arduino IDE, using the commonly available "sketches"... the programming language you have actually been using is C++.

The arduino IDE provides some simplifications and automatically loaded libraries (and headers), but generally speaking what you have is a C++ compiler with some handy wrappers (such as `setup()` and `loop()` instead of the more normal `main()`), and a slightly bug-prone function-declaration generator. ( http://www.gammon.com.au/forum/?id=12625)

That is the explanation for the gap in documentation and examples... if you want to make significantly more complex code work on an arduino, you're going to need to learn more about how C++ works. There are _tons_ of free youtube courses, tutorial websites, and help sites dedicated to this language. This year's "CPPCON" conference was done remotely, and the talks are being steadily uploaded to youtube. The nature of arduino programming means you will probably not be doing much "dynamic OOP", but there are large pieces of the more modern "data driven" approach that work very well.

"A resistor makes a lightbulb and a capacitor makes an explosion when connected wrong"
"There are two types of electrical engineers, those intentionally making antennas and those accidentally doing so."


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@jker

Posted by: @jker

I'm fairly strong on the programming side, but somewhat weak on the electronics side.

Me too, though I am getting better over time 🙂

Posted by: @jker

A lot of people in this community seem to be comfortable with the electronics, but not so much with the programming. If you have mostly been playing around with the arduino IDE, using the commonly available "sketches"... the programming language you have actually been using is C++.

I completely agree, and I have highlighted this a point number of times, but probably with not too much success!

Posted by: @jker

if you want to make significantly more complex code work on an arduino, you're going to need to learn more about how C++ works.

Again, I agree - Most people do not understand the advantages of classes, especially the one's who think the're actually programmers, and indoctrinate the member masses to avoid their use!

Posted by: @jker

The nature of arduino programming means you will probably not be doing much "dynamic OOP", but there are large pieces of the more modern "data driven" approach that work very well.

True - Most people just plagiarize some code of the net, and try to get it to work by hook or by crook, and that's good enough for them, irrespective of any security issues, etc... Although C++ is my favorite language, I know of and consistently practice with many other languages, just to stay up to date as mush as I can, because that's the nature of being in IT!

Cheers.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jker
One of the more confusing aspects for me, at first, was the behavior of inductors, and since DC motors behave as inductors...

When teaching myself basic electronics many years ago now I found mechanical analogs useful. An inductor I imagined as a water wheel (or turbine in a pipe). When pressure is applied the water wheel will resist the flow of water while it gets the water wheel turning. The opposite happens when the water pressure is removed,  the wheel will try to keep moving the water along. The inertia of the wheel is an analog of inductance. The turning wheel is the magnetic field that builds up around the inductor. When the pressure is released (or lowered) the magnetic field starts to collapse and the collapsing lines of force keep the electrons flowing. All conductors have some inductance (a magnetic field around the wire that resists changes in the flow when the pressure is changed.

There are simple circuits that you can experiment with to learn the behavior of inductors and capacitors and how the work together to do neat stuff in an electronic circuit.

 

 


   
jker and ZoolanderMicro reacted
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

@robotbuilder The inertia of the wheel is an analog of inductance.

Excellent analogy of inductance, thanks, When I wanted to go beyond my Arduino starter kit, I found some books that really helped. Try Make: Avr programming. This book helps with understanding many of the more interesting features of AVR microcontrollers. Also, Beginning C for Arduino, Second Edition: Learn C Programming for the Arduino (Jack Purdum). This is a great C programming book using Arduino as a target to get useful output to the serial monitor. For a more friendly approach, anything by Simon Monk would be a good choice. Another C programming book with examples of user input and output is C Programming Absolute Beginner's Guide 3rd Edition (Greg Perry). Don't let the title fool you, it really delves into C. After all, Arduino sketches are an extended C language directed toward programming AVR microcontrollers. Object code for sensors and actuators is usually written in C++ or Python. When you create an instance of an object (servo, NeoPixel, proximity sensors, etc.) in your C (procedural) code, the included header file references a library for the object. There are many libraries available, and you can add URLs to the Arduino IDE. There is a list of additional libraries at Arduino.cc. Retail vendors like SparkFun and Adafruit have repositories on GitHub. There are also many libraries for boards and shields. My favorite additional board library is the ATTiny Core by Spence Konde. I use it when programming chips like the ATtiny45 and ATtiny2313.  

ZoolanderMicro, where small ideas are a big deal


   
Ken reacted
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

@robotBuilder There are simple circuits that you can experiment with to learn the behavior of inductors and capacitors and how the work together to do neat stuff in an electronic circuit.

I hadn't worked with electronics since high school (class of 74). After I got my Arduino Uno, I started reading tutorials online. One tutorial series led me to oscillators and 555 timers. These are really fun to play with, and a good way to learn about resistor/capacitor (RC) circuits. A book that I found to be indispensable is Timer, Op Amp, and Optoelectronic Circuits & Projects 1st Edition (Forest M Mims III). There are many great books about electronics. I bought a copy of Teach Yourself Electricity and Electronics by Stan Gibilisco. I found it at a yard sale. I liked it so much that I bought a replacement from Amazon when my first copy was destroyed. It suffered an unfortunate jello incident and was subsequently devoured by my dog.

ZoolanderMicro, where small ideas are a big deal


   
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

I love LEDs. Most of my projects are things the make weird sounds or pretty lights. AVRs cannot source or sink very much current; a few LEDs at a time. I use bi-polar junction transistors (BJT's) as switches to control larger currents. Get some PN2222 NPN transistors. They can handle about 800mA of continuous current. There is a great online tutorial about using transistors as switches at  Transistor as a Switch - Using Transistor Switching (electronics-tutorials.ws) . This site has a series of great tutorials. This is where I got onto oscillators and 555s. 

ZoolanderMicro, where small ideas are a big deal


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@zoolandermicro

I hadn't worked with electronics since high school (class of 74).
There are many great books about electronics.

In my case I am entirely self taught in basic electronics and programming which goes back to the 1960's so I have collected many books over the decades on electronics, programming and other subjects that interested me.  I learned to program in BASIC and Assembler with the TRS-80 and used a book that showed how to interface it with electronic projects just like you can do with the Arduino or RPi.  Later I did the same with the C64 and the PC parallel ports. Actually my first programming language was machine code using a computer kit programmed in binary via toggle switches with LED outputs on the front panel.  All as a hobby in my spare time.

 


   
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

I have the book Some Assembly Required: Assembly Language Programming with the AVR Microcontroller 1st Edition (Timothy S Margush). I thought it might give me a more in-depth understanding of AVRs. The reading was a bit dry and I lost interest. I should pick it up again and give it another shot.  

ZoolanderMicro, where small ideas are a big deal


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@zoolandermicro

Assembler was good for speed and writing compact programs but today there is plenty of memory and the C++ compilers are very good so I no longer use Assembler. I would leave all that low level stuff to the experts.

A microcomputer can be seen as a programmable chip which can be understood in terms of its i/o alone. All that is required is an understanding of basic digital and analog electronic circuits of which the microprocessor is but one module.

In regards to the title of this thread,  I last bought books on the Arduino and RPi last year before covid however I also google for ideas on whatever project I am currently working on with some success.

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zoolandermicro

Posted by: @zoolandermicro

Excellent analogy of inductance, thanks, When I wanted to go beyond my Arduino starter kit, I found some books that really helped. Try Make: Avr programming. This book helps with understanding many of the more interesting features of AVR microcontrollers. Also, Beginning C for Arduino, Second Edition: Learn C Programming for the Arduino (Jack Purdum). This is a great C programming book using Arduino as a target to get useful output to the serial monitor. For a more friendly approach, anything by Simon Monk would be a good choice. Another C programming book with examples of user input and output is C Programming Absolute Beginner's Guide 3rd Edition (Greg Perry). Don't let the title fool you, it really delves into C. After all, Arduino sketches are an extended C language directed toward programming AVR microcontrollers. Object code for sensors and actuators is usually written in C++ or Python.

The language used in Arduino, is based upon the Wiring framework, which is actually written using C++.  Many people do not understand the subtle differences, but the obvious glaring one is that "C" does not have "classes".  C++ however does, whilst encompassing (AFAIK), most of the "C" standard library, allowing you to write "C" code in an C++ environment.

Programming under Arduino proves this by supporting in written code, namespaces, templates, new, delete, references, etc... C++ language keywords and functions that are not available in "C", unless added in recently that I am unaware of.

At the end of the day, Arduino supports a (sadly) cut down version of ISO C++ (based on the Wiring framework, written in C++), which encompasses most of the standard "C" standard library... and as such, we have the best of both worlds.

The new and upcoming Arduino Pro IDE is slated to support C++, JavaScript and Python when it is released.  I download the nightly builds at least once per week, and it looks to be coming along nicely... very VSCode like.

Cheers.


   
ReplyQuote
Page 1 / 2