Go Down

Topic: I need help learning the code & syntax. (Read 2163 times) previous topic - next topic


I'm well versed in the hardware aspect of my (duemilanove) but the programming language still mystifies me to the degree of 99% I was able to write a sketch for sequencing LEDs in a patern that mimics a 4-bit binary counter. "But it was only just an extensive modification of the (LED blink) sketch", but I still don't understand the code language Arduino uses. Can anyone help me learn the code/syntax? I'm not asking for anyone to do the programming for me. I want someone to teach me (as if I were in college being taught step by step) the language so that I'll be able to sketch for myself.  I realize that peoples' time is precious, so I'm willing to work around schedules, and at my instructors pace. I'm at my wits end with this. :~ thanxs in advance to anyone that can help. :)


Feb 15, 2011, 05:50 am Last Edit: Feb 15, 2011, 05:53 am by retrolefty Reason: 1
but I still don't understand the code language Arduino uses.

Arduino is programmed using the C/C++ programming language, one the the more popular and older languages around (from the 70s anyway). There is tons of learning material on the Internet for learning the syntax of the language, you just need to search for something that works for you.

The Arduino site has some stuff to help you get started learning, (http://arduino.cc/en/Tutorial/HomePage). There are a ton of book available on learning C/C++. I'm sure even your local library would have something on C.

If you feel that you can only learn via a one on one personal instructor, then possibly advertise for a tutor on your local Craigslist classified or equivalent.



Thanks, Lefty for your reply, but money is tight for me. the only reason I have My duemilanove is that it was a gift. I'm aware of the books and other literature out there, but am unable to afford it. unless you know of where I can get the info I need for free, I'm stuck. Any web pages to suggest? :)


Just start searching, maybe with this list: http://www.google.com/search?sourceid=navclient&aq=0&oq=stanford+com&ie=UTF-8&rlz=1T4GGLL_enUS373US373&q=stanford+computer+science#sclient=psy&hl=en&rlz=1T4GGLL_enUS373US373&q=c+tutorial+for+beginners&aq=1&aqi=g5&aql=&oq=&pbx=1&fp=e637dc619dfb9af3


Lefty>> I've looked at the tutorial link you post. I appreciate the help emensely, but text based insturctions don't float very well in my brain. I'm a visual learner. I need to be shown how to do something, or it doesn't stick. Hiring a tutor is very expensive, or I would have done just that. My local library has such a limited inventory concerning c/c++ and the companion tutorial CDs that are supposed to be with the books are never there. if they were this would've been much easier. That is why I "plead" no "beg" for help. which I don't like doing. I'm almost at the point where I will be forced to give up on working with the Arduino. If I don't have a breakthrough soon... Don't be surprised if my duemilanove turns up on Ebay.


Lefty>> I went to then link: google....and it seems simple to follow, based on what little I viewed, but there didn't seem to be much there. the tutorial was only 5 or 6 pages long. it may help some, but how much? anyway you don't need me laying my mounting frustration on you. Thanx for your help dude.


Have you looked at the Earthshine projects book - its pdf and free (thanks guy from Earthshine who's name I cannot fathom at this point)?

How bout the tutorials at this site which is also step-by-step and I found it quite informative a few days ago and I don't even have my hardware yet. http://www.ladyada.net/learn/arduino/index.html

Did you try the Arduino notebook here: http://arduino.cc/playground/uploads/Main/arduino_notebook_v1-1.pdf

The best way (not suggesting you didn't try it that way) for me to learn has always been to do something practical (maybe thats why maths was always a drag for me) and these tuts kinda do that.

Otherwise see if there will be a get-together in your area, best I can suggest at this point.
"The really amazing thing is how many people are successful with their Arduino projects considering the fact that so many of them do not have a technical background.  A lot of them seem to try, and succeed with, projects that no sane engineer would even attempt." - floresta commenting on the proper use of LCD displays


Why not try working through and modifying some of the tutorial examples and some of the stuff in the playground.
If you get stuck, or don't understand something, ask a specific question.
The forum isn't really an ideal medium for conductive learning.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Feb 15, 2011, 04:38 pm Last Edit: Feb 21, 2011, 12:02 am by Ian Tindale Reason: 1
Programming languages do this:
  • Give you a place to put information
    • Let you perform operations on that information (like adding up and stuff)
      • and let you put the result somewhere.

  • Let you progress through a sequence of operations, one after the other
    • You can store information while you're doing this

    • Or retrieve information if you need it

  • Let you decide whether to do something or not
    • and if you don't, you can jump past it

  • Let you jump forward or backward in your progress,
    • combined with a decision,
      • so that you go in a loop

  • Let you put blocks of everything described above together, in a handy group
    • Let you name those blocks, so you can refer to them when you need them
      • and let you give information to that block and get information back

That's about it for programming languages. Anything else is just fluff. Each language calls those things above slightly differently, with different names, and there's variations and differences for each type of those things, but it all basically adds up to: somewhere that information can rest and be found again; some way of performing an operation on the information; some way of deciding; some way of looping; and some way of grouping up blocks of commonly used sequences. That's programming.


That's programming.

Programming is also long nights fuelled by coffee and pizza, often resulting in hair-loss and weight-gain.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Why not try working through and modifying some of the tutorial examples and some of the stuff in the playground.

Then if there is a function/command/any other thing you don't understand, check out the referance page:

arduino is fantastic in that you can do so much with so little. Experiment with serial communication - this requires no external hardware at all. Learn the basic commands like for loops, analog write, things like that. In this way, you can do a lot with arduino using limited hardware and only a few commands. That is how you can do so much with so little.
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

Go Up