Microcontrollers > Microcontrollers/General

arduino question

(1/4) > >>

johnnym:
I saw the getting started with uno post at the top but have some questions. I have a couple of Arduino kits (uno and mega)with all kinds of components. It seems that if you are not competent in C or C++ then all you can do is copy the typical projects and not really create anything on your own. The only thing I can do with absolutely no help (not looking up code or schematics) is with a bunch of LED's. You know, make them blink in different ways, whatever I want them to do. Printing what they do on the serial port (I find pointless but probably worth knowing) etc... It is more of the software side than the hardware that is my problem. If you don't know how to code and use the proper syntax then you get stuck. My goal was to build stuff without any external help but that seems impossible.

They (I guess the general consensus) say it is a C/C++ language but it seems to lean more towards C++. I have always been more interested in the hardware but since my programming skills are at a beginner level I am stuck.

Would learning C++ or C help or translate over to the Arduino IDE? You know, in order to make the coding easier? C++ is supposed to be more involved than C? I just don't get programming. How can I learn C or C++ without spending a ton of money? A guide would be nice. At the rate I am going it will take years to create anything actually original on my own without no one showing me the way. Where can I learn to code properly? Any suggestions ?     //frustrated hobbyist ranting about programming


DamonHD:
I don't *think* that I paid for any C++ learning stuff ever, and have done it consultant/professional level in finance and for embedded.  There is lots of free material out there, and you can learn the bits that you need to, at your own pace.

Our Radbot product has many 10s of thousands of lines of C++, all compiled through the Arduino IDE (running on the same AVR chip as in the UNO).  It's not the most sophisticated build environment that I've ever used, but it is good and robust.  We have many thousands of devices in the warehouse with Arduino-compiled code!

I suggest that unless you want to do complicated things, handling significant amounts or complexity of data, you can largely ignore the C++ and work more at the C level if that is easier to get to grips with.

Rgds

Damon

Bruce S:
I agree with Damon.
I can barely code with basic, yet it seems that's enough to get started doing the more complicated stuff.

Operhouse has become my hero when it comes to the Arduino stuff  8), I believe he's self taught.

What I've learned is not to get so deep into coding that you lose yourself in it.

My current project is running my hydroponic pump using an UNO. nothing fancy, turn it on for (X) amount of time then off for (X) amount of time. Once it's stable, I'll move onto turning to grow lights on , etc.

Arduino has online classes
 https://www.arduino.cc/en/Tutorial/HomePage?from=Main.Tutorials

Hope this helps.

Bruce S

OperaHouse:
There is plenty you can do without knowing C.  I have shown all my code using only IF statements in sequential order so beginners can easily follow.  Pretty much conversational English.   Good code is almost unreadable. If it was there would be no reason to hire the guy.  You will get really screwed up with things like if (y = 12) which seems reasonable when you see it. This being a logic operation, (y == 12) only works. It is easy to never see that error when things don't work.  It is picky. Create some boilerplate programs that have the basic stuff already ordered and add code to that. The sample programs are good for that.  I find it a real headache starting from nothing. Boilerplate lets you get into the code right away. Write up one function at a time and get that to work before going to the next section of code. Success builds confidence. Avoid do and for code.  It may be compact but it is easy to get lost. Avoid shortcut coding. When you come back in 6 months it will be much harder to figure out when you have forgotten the language tricks like X++1. No one will see your code. No need to be embarrassed by clunky code that works.  Always use  a serial line at the end that reads out the variables. Helps a lot when trying to diagnose a problem.

Bruce S:
OperHouse
 Thanks for chiming in.

johnnym
Also; you could post what code you're working with or the plan of what you're attempting here.

We could always help too.

Cheers
Bruce S

Navigation

[0] Message Index

[#] Next page

Go to full version