Starting Arduino, but no micro-controller programming skills

Wolframore

Joined Jan 21, 2019
2,619
Of course you need line numbers. Did you ever get an error in your C code that the debug software caught? It always refers to the LINE NUMBER!
In BASIC editors the line numbers are automatically inserted for you so you rarely have to think about them. But when you have an error, they are easy to find.
Back when I started my editor didn’t add line numbers. I remember skipping numbers so I could add lines in-between later.

Hey what do you know... my editor does have line numbers... never noticed cause it's never been important like it is in BASIC... for instance you can't use the GOTO command... it doesn't work.

If you want to list the annoying things about C/C++ don't forget all the formatting requirements... you get used to it but it's a challenge at first... luckily most editors will check for these issues and compiler also flags errors. Then a quick look at reference should be all that's required to fix the issue...

I like being able to call up subroutines by name.

But sorry to discount the pain of learning a new programming language. it is a pain and I am no expert but from where I stand I like what it's able to do. It really makes the main program simpler and it is better organized if you look at it from a structure point of view.
 
Last edited:

SamR

Joined Mar 19, 2019
5,491
I learned in Fortran and PL1 as a start long ago on huge mainframes, Arduino is much easier. If you read the history of the Arduino it was developed toward Art users to be used to adjunct their creations. That should be a clue as to how difficult it was designed to be for learning to use. While it resembles C and shares many of it's commands and structure it is not. There are also some commands in Arduino that are unique to that device. My mantra used to be "I'm not a programmer" when I was integrating PLC's and Distributed Control systems to industrial processes. But I lied because I actually did quite a bit of programming in several different operating systems. Venix, Xenix, Unix, VMS, DOS, and several others. Arduino is fairly easy to learn and can get quite intricate if need be. More than the Arduino can handle actually. So have fun it's a rather painless introduction to MPUs.
 

ozjon69

Joined Jul 19, 2010
11
I’m an experienced electronics hobbyist but have never learnt PICS/Micro controller/Arduino/etc. I’d like to remedy that and get stuck into Arduino. But even after a fair amount of research I’m still unsure about how best to achieve this. I have a shed workshop crammed with components, albeit mainly ancient. My hundreds of finished projects typically use CMOS, TTL, linear (555/741/etc). However, apart from a little VBA (for Excel), my last proper programming was over 40 years ago.

So I need a really well written tutorial that will step me through the basics. Truly from scratch, which none of the few I’ve browsed so far achieve. Ideally with practical examples as that’s the way I like to learn.

Do I also need an ‘Arduino kit’? Apart from the micro controller chip, those I’ve seen advertised seem to contain parts I already have, which is why I hesitate. But if that would significantly smooth my learning then I would cheerfully buy one.

I’d be most grateful for any recommendations please.

Terry, East Grinstead, UK
You won't regret deciding to have-a-go at Arduinos.

Very quick, easy and ridiculously cheap to get something designed, coded assembled and working.
In particular, you can buy an Arduino Nano 3 (equivalent to a Uno) on ebay with change from $4 (delivered).
In fact, I now use a Nano3 in preference wiring-up more than 3 or 4 CMOS chips...quicker, easier, cheaper
The quasi-C Arduino coding isn't so bad to learn from scratch.
Importantly there is an enormous amount of tried-and-tested code freely available on the net.
Whatever you want an Arduino to do, you can be pretty sure that someone has done it already and published the code.
Use that code directly, modify it a bit, or examining how they coded it, you can soon pick up the Arduino coding technique.

Go for it - Enjoy!

I’m an experienced electronics hobbyist but have never learnt PICS/Micro controller/Arduino/etc. I’d like to remedy that and get stuck into Arduino. But even after a fair amount of research I’m still unsure about how best to achieve this. I have a shed workshop crammed with components, albeit mainly ancient. My hundreds of finished projects typically use CMOS, TTL, linear (555/741/etc). However, apart from a little VBA (for Excel), my last proper programming was over 40 years ago.

So I need a really well written tutorial that will step me through the basics. Truly from scratch, which none of the few I’ve browsed so far achieve. Ideally with practical examples as that’s the way I like to learn.

Do I also need an ‘Arduino kit’? Apart from the micro controller chip, those I’ve seen advertised seem to contain parts I already have, which is why I hesitate. But if that would significantly smooth my learning then I would cheerfully buy one.

I’d be most grateful for any recommendations please.

Terry, East Grinstead, UK
Answering you specific questions;-

All you need is an Arduino.
You appear to have any other necessary components already (a 5V supply, LEDS, resistors, caps, sensors etc).
I recommend buying a 5-pack of Nano 3's on e-bay.
Maybe also a few cheap H-bridge servo/motor drivers too?

Everything else you need to get started you can find via Google search, forums and and downloaded programs.

Enjoy!
 
Last edited by a moderator:

Wolframore

Joined Jan 21, 2019
2,619
In fact, I now use a Nano3 in preference wiring-up more than 3 or 4 CMOS chips...quicker, easier, cheaper
This is so true... there are still times when CMOS comes in handy... but nothing like the ease, low part count and the ability to change programming quickly without hardware changes...

Now if we can just somehow speed up and simplify the compile and program... I need to work on a gang programmer...
 

Thread Starter

Terrypin

Joined Feb 5, 2016
113
First, thanks a bunch for all the subsequent advice and recommendations, which are much appreciated.

I finally decided to start with the Elegoo Uno R3 Super Starter Kit. The description in my Amazon UK email is "Elegoo UNO Project Super Starter Kit with Tutorial for Arduino". It cost £29.99 (about $38) and arrived a couple of hours ago. I've just installed the IDE and also copied the English folder from the CD across to my Win 10 Pro PC. I've copied arduino-1.8.9-windows.exe from the Arduino site to a USB stick and tomorrow I'll install it to its intended location in my shed workshop, where I have my old PC, running XP.

BTW, after impatiently homing in on the prominent 'GET' icon on the download page I first installed it as a Microsoft App. Presumably there's no potential conflict, so I needn't uninstall the 'App'?

Oddly, the kit's CD wouldn't play on my DVD player in the lounge, but was OK on this Win 10 PC. Shame, I was going to enjoy a brief introductory browse of the PDF tutorial with a glass of wine ;-)

Looking ahead, assuming I can learn enough to design my own circuits, what is the recommended practical approach? After getting something working on the kit breadboard, I assume I can then make a permanent, cased version by buying the appropriate chip and socket, and soldering up on veroboard, my usual approach?

The project that I was about to attempt with traditional stuff would have needed 10 successive 555 monostables (each one driving either a solenoid or some sort of motor, to press a Polaroid CUBE camera button). Hopefully the Arduino will make that task easier - eventually!

Terry, East Grinstead, UK
 

SamR

Joined Mar 19, 2019
5,491
I don't think you will find anything worth building permanently. Most are just exercise pieces to let you become familiar with the coding and how it interfaces with the MCU and breadboarded circuit. Sort of bits and pieces to let you become familiar. There is also a lot to learn just about the programming that does not require hardware. Enjoy!
 

djsfantasi

Joined Apr 11, 2010
9,237
The Arduino also includes power regulation on board. You have already implied that you’re aware of such niceties. It would be required on your custom board.

One area that may foil your efforts is the Arduino family includes an onboard FTDI USB interface. On your roll-your-own boards, you’d have to add this functionality. Or otherwise provide hardware serial communications. This is necessary because it’s the only way to program a bare chip. First, to install a boot loader and second to upload the microprocessor with your sketch (program).

Secondly (because I’ve yet to attempt what your suggestion) the PIN numbers in the Arduino IDE may not match the pins on a raw ATMega328. YMMV

So no, it not as simple as getting something to work on an Arduino and then plugging a bare chip into your custom board.

How are you going to reset the chip if necessary? Do you want some indication of power or serial communications? Do you need a built-in status indicator (in unison now, PIN 13)!

But don’t worry about that now! I’ve embedded Arduino UNOs in several projects and that was it.

Your first challenge is to learn how to use the Arduino. Connecting inputs and outputs. Programming in the Arduino variant of C++. Have fun with it for a while. Besides the kit projects, try all the example code provided with the IDE, read it until you understand exactly what it does. Browse the Arduino, AdaFruit and SparkFun web sites. Learn what a shield is and look at the many shields available from those three resources.

But above all... have fun!
 

Wolframore

Joined Jan 21, 2019
2,619
Hey @Terrypin congrats! I love these uC's they certainly make things easier in terms of hardware... I've lost count of how many UNO's and nano's I have... I also have DIP chips and exploring other options for permanent projects. The chips are easy to use. You can basically power them and go. DIP chips can be exchanged on the DIP version of UNO which makes them easy to program... otherwise it's just a little more complicated... JTAG, other arduino.... so on.

Here's a pdf link for your elegoo starter kit - maybe you can use this to read on your other device.

http://mthackathon.info/resources/The-Most-Complete-Starter-Kit-for-UNO-V1.0.17.3.6.pdf
 

djsfantasi

Joined Apr 11, 2010
9,237
Hey @Terrypin congrats! I love these uC's they certainly make things easier in terms of hardware... I've lost count of how many UNO's and nano's I have... I also have DIP chips and exploring other options for permanent projects. The chips are easy to use. You can basically power them and go. DIP chips can be exchanged on the DIP version of UNO which makes them easy to program... otherwise it's just a little more complicated... JTAG, other arduino.... so on.

Here's a pdf link for your elegoo starter kit - maybe you can use this to read on your other device.

http://mthackathon.info/resources/The-Most-Complete-Starter-Kit-for-UNO-V1.0.17.3.6.pdf
How do you program a bare chip without the boot loader?
 

djsfantasi

Joined Apr 11, 2010
9,237
Fine. But you have to know to order chips with the boot loader pre-installed. The TS is an acknowledged μP noob. We have to be specific
 

Wolframore

Joined Jan 21, 2019
2,619
You don't need the bootloader pre-installed if you already have an Arduino... you can use it to burn a bootloader on any Arduino IC.

Plus if you don't mind running at 8Mhz there's an internal clock so basically you just decouple VCC put power to it and go.
 

Wolframore

Joined Jan 21, 2019
2,619
I've done it a couple times... but because it's a pain in the butt without a FTDI chip for USB since you need JTAG... I just use NANO's now until programming and hardware is finalized and going to print.

I've been finding NANO's for almost as cheap as the chip itself.

It just took about 25 years for me to be able to use this on a personal level... back when STAMP's were $100 each plus all the programs and stuff you needed... was too much. Now we can all be spoiled.
 

Thread Starter

Terrypin

Joined Feb 5, 2016
113
Too impatient to wait until tomorrow so installed it on shed XP PC an hour ago. But seem to have hit an immediate snag. When I run Arduino.exe the ‘welcome’ window pops up very briefly and then nothing.
 
Top