Pages: [1] 2   Go Down
Author Topic: Programming - Where do I start?  (Read 1465 times)
0 Members and 1 Guest are viewing this topic.
Adelaide, South Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First time poster here. Before I fire of my questions, just a brief about me. I am a retired electronics engineer of 40 years. Never had the need to get involved in programming so from that perspective a novice. Now have plenty of time on my hands and looking to fill some off that time.

I have been researching the Arduino platform and impressed with the concept. What I would like find is what is the defining programming reference how to manual? A manual that takes you from ground zero and explains programming concept, language, syntax, examples etc etc. would appreciate any guidance other users who have gone before to point me in the right direction.

Be interested in open comments on wether the Arduino is the best platform for a beginner? Is there other option I should be looking at before going Arduino? Are there any alternative platforms that might make more sense for someone like me to ease me into programming....PIC, Atmel ???

Regards,

Fleetz


Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think your choice of the arduino to be the best for a beginner.
I don't know of a book. Since the internet/google, I have pretty much stopped reading paper.
Browse through the arduino web site (lots of info in here).
Use the example programs in the IDE.

Have you got an arduino board yet, and the IDE? Have you tried the blink example?

There are a few of us old retired guys on here. I will turn 65 in 3 months.

If you have questions, we are here to give advice. Welcome!
Logged

Good luck, Jack

Adelaide, South Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Jack,

Thanks for the reply. Yes there is a plethora of info on the web ...probably too much for a beginner!  smiley-eek  I suppose what I was looking for is that must read that give you the aha moments...I will keep digging.

No I have not yet got an Arduino board and IDE yet. Still wanting to make sense of the programming side first, that said I will most be jumping in and getting my hands dirty soon. I see there is a starter kit that sells for around the $100 mark......is this a good starting point?

Good to know there a number of retires here......what do you do with your Arduino platform?

Regards,

Ian
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know about the starter kit. I buy my components individually (seems to be half the fun). A arduino board will be about $20 +-. You can run many of the example programs without any additional components (resistor, LED, cap, transistors, etc). Maybe you already have some of the additional components.

I use my board(s) to experiment with mostly. I have one setup outside for a night light control, and dog/duck feeder alarm. I keep wanting to add garden watering, but I procrastinate.

Join us.
Logged

Good luck, Jack

Queens, New York
Offline Offline
Faraday Member
**
Karma: 108
Posts: 3785
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have a RadioShack nearby, see if it sells Arduino kits. They come with a lot of great components and they are perfect to start with. The Arduino IDE has plenty of example scripts(codes) you can play with and get to learn the language.

Understanding and writing code, is actually quite easy. I always tell people to think aloud about what you want to do, then see what you have at your disposal.

Example:
I want my LED to turn ON for 5 seconds then OFF for 2 seconds, then repeat.

(I put it in quote tags to use the bold and color options)
Quote
byte LED = 13; //Declare what pin your LED is set to, in this case were going to use the onboard LED on pin 13

void setup() //You must have the setup function in your code. **What ever is in this function will only happen once when Arduino has power
{
  pinMode(LED, OUTPUT); //You want to control this LED with the Arduino, so you want the pin to be set as an OUTPUT
} //End of Setup function

void loop() //Again, this is a must have, even if you don't use it. This function will constantly loop when the Arduino has power
{
 digitalWrite(LED, HIGH); //tell pin 13 to be set HIGH
 
 delay(5000); //This function is in milliseconds, so 5000 milliseconds = 5 seconds.
 
 digitalWrite(LED, LOW); //After the 5 second delay is done, this will turn the LED OFF

 delay(2000); //a 2000 milliseconds = 2 second delay

 //Once the 2 second delay is done, the loop will start over.
} //End of Loop function
 
« Last Edit: September 08, 2013, 07:27:03 pm by HazardsMind » Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Illinois
Offline Offline
Newbie
*
Karma: 0
Posts: 19
Retired Industrial Automation Tech
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

White breadboards for us old farts.
Logged

Do you know what this means? It means that this damn thing doesn't work at all!

0
Offline Offline
Sr. Member
****
Karma: 4
Posts: 329
KC4MM
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From one retired old fart EE to another the arduino is  a great and fun place to get started programming but I wouldn't be too formal about it. The language is a subset of C++ with a few oddities thrown in  to suit the platform.

I recommend you pick up one of the several books on arduino programming from Amazon and flick through them. At the same time, equip yourself with a starter kit containing an Arduino board, a breadboard & some wire and a few resistors, LEDs, switches etc then just dive in. You'll learn rapidly once you get the syntax down, make a bunch of mistakes, and have a blast.

As with most things KISS (keep it simple - you know) to start. Before long you'll have it down. Don't try to learn it all at once. There is a lot of reference material here. Check out the links at the top of the page - especially the playground.
Logged

Cincinnati, OH
Offline Offline
God Member
*****
Karma: 50
Posts: 918
I'm not bossy...I just know what you should be doing.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Some beginning Arduino books concentrate on programming while others emphasize the hardware elements. Because I come from a software background, I tended to gravitate towards those that discussed the hardware. Given your background, look towards those that emphasize the software. So, how do you pick? First, most of the books on Amazon have a "Look Inside" feature that let's you read a small section of the book. I taught programming for over 25 years, including C, and the stumbling point for a lot of students is pointers. Therefore, "Look Inside" at the book's Tabel of Contents and then read the treatment of pointers 'cause, if they get that right, chances are pretty good they got the rest of it right, too.
Logged

Global Moderator
Melbourne, Australia
Offline Offline
Brattain Member
*****
Karma: 511
Posts: 19367
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino Uno is probably the best to start with. I don't know about the "starter kit". You are probably best off getting a Uno, and a handful of LEDs, switches and resistors.

The IDE (which you can download right now for free) has lots of example programs. To make a bit more sense of it I would Google "C++ tutorial" although a lot of them assume you have standard input and output (ie. a keyboard and screen).

I would start by getting a few LEDs to blink in sequence, and then perhaps making them do something different if you press a switch.

Make sure you read up about resistors and LEDs (eg. http://www.thebox.myzen.co.uk/Tutorial/LEDs.html ) and some tips about switches (and some simple code) are here:

http://www.gammon.com.au/switches
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Saskatchewan, Canada
Offline Offline
Edison Member
*
Karma: 49
Posts: 1421
Coding Geezer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been all over the map, since 1966.. started off in hardware repair, doing some assembly (plugboard on an IBM 6400, IBM 360, etc.), some higher level languages (Fortan was my first), and then in about 1996, ended up coding for a living, both high level in the PC, to control my assembly stuff (Mits, 65xxx, Atmel AVR, etc.). So now, retired, I ended up coding for fun (VB.Net mostly), and decided to get into Arduino a month or so ago. Picked up an Arduino Uno on eBay, from China (genuine one, I think), for about 12 bucks, some prototyping shields with stick-on plastic breadboards, and a few sensors (my current project is a cloud sensor using a Melexis IR temperature sensor). So here I am, fiddling with a low-level machine, using a high-level language. Things do come around, don't they?

Dive in. Don't be afraid to try things. You aren't likely to break anything, and if you do, it's not like you have to spend hundreds to get back into it. Check out the examples as well as the projects you can find all over the net. Above all, have fun.
Logged

There are 10 kinds of people in the world,
those who understand binary, and those who don't.

HANOI, VN
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I suggest you reading this book " Beginning C for Arduino " by Jack Purdum. Obviously, the name tells you that it was written specifically for Arduino users. Though, there are lots of similarities between C++ and Arduino language. The book is written in a very simple and clear way that most people can understand as a beginner. Almost every concept is well demonstrated in this book.

To help you understand more about AVR, the heart of Arduinos, let take a look at "Embedded C Programming and the Atmel AVR ". The book is a concise handbook for you to get to know the function of registers. You can apply the same code to Arduino as well and creat more flexible functions for your board.

Good luck!
Logged

Cincinnati, OH
Offline Offline
God Member
*****
Karma: 50
Posts: 918
I'm not bossy...I just know what you should be doing.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@trung_aero: Thanks for mentioning my book. I did so want to say something in my own post above, but felt kind of guilty about it...always better for someone else to say it. Thanks!
Logged

Adelaide, South Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

Thanks very much for the info and encouragement.

All is beginning to make sense, have spent most of the day doing google searches, watching You Tube tutorials etc. a ton of info is out there and here too of course.

So I will get an Arduino board to get my toe in the water, from the research I have come up with to date it seem the Arduino UNO Rev 3 might be a good starter level for a programming novice like myself? Is this a good level to enter?

I will be ordering the books mentioned as I believe good reference books are essential.

Thanks for you input and wisdom.

Regards,

Fleetz
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you will be happy with the Arduino UNO Rev 3.
Logged

Good luck, Jack

New Jersey
Online Online
Faraday Member
**
Karma: 72
Posts: 3763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Given that you will obviously have no trouble with the electrical side of the house, consider doing some C/C++ tutorials before you combine it with the arduino. Once you have the core coding concepts down, it will be easy to add the arduino.
Logged

Pages: [1] 2   Go Up
Jump to: