---
+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Member level 2
    Points: 646, Level: 5

    Join Date
    Jan 2012
    Location
    Denmark
    Posts
    44
    Helped
    0 / 0
    Points
    646
    Level
    5

    Arduino language vs C best way of learning

    POST NOT SOLVED!
    I have to select the Solved prefix on my IPhone app.

    Hi All,

    I have just bought an Arduino Uno board and I have tried different things like cinnecting a LCD display and making a voltmeteret etc. And yes it is so easy!

    I really samt to learn programming and I started of buying the STK500 kit using avr codevision. But I quickly get stuck, not knowing how to code something, for an example to get a LCD display working. To get help I turned to Avr Freaks forum but my experience is that asking for code examples there is like an insult to the members.

    Back to Ardunio, with all the projects it should be easier to learn coding, reading earlier posts made here I read that the Ardunio language is different from "normal C" :(

    Can you guys recommend me the best way to learn coding? Attending an education to learn it is not an option for me at the time, so it has to be a way of self learning.

    I don't hope that my post was to long and boring to read:) every suggestion from you is appreciated greatly!:)

    Kind regards
    Michael
    Last edited by alexan_e; 9th July 2012 at 21:22. Reason: removed prefix

    •   Alt9th July 2012, 21:04

      advertising

        
       

  2. #2
    Advanced Member level 4
    Points: 6,315, Level: 18

    Join Date
    Feb 2011
    Posts
    1,170
    Helped
    283 / 283
    Points
    6,315
    Level
    18

    Re: Arduino language vs C best way of learning (NOT SOLVED)

    Hi Michael,

    If you wish to persevere in C, then the attached doc here may help - I wrote it in simple language to get anyone started,
    at least to the point of writing the first program with a switch as input and LED as output, and getting it compiled and
    downloaded.
    I've heard Arduino is easy to use too, but I've never tried it. Perhaps someone else has a good link for Arduino coding.
    The best way to learn C (in my opinion) is to follow a textbook unfortunately. The (short) classic reference is
    "The C Programming Language" which is suprisingly expensive for such a short book, but it is worthwhile - I think most people
    would recommend it. It has high resale value. I also used another book called "Problem Solving and Program Design in C" which
    again is expensive but you could get an old edition (C doesn't really change over the years).

    The good thing is that C is quite a short language, maybe 20-30 keywords? So it won't take you long to begin writing
    software. And you could learn it quite easily on your PC; on a Windows machine download "mingw" (or cygwin - select GCC when installing it)
    or on Mac you can use 'gcc' directly, and for Linux you can install gcc as a package - lots of web links on these subjects.
    If you get stuck, this forum has many people familiar with C.



  3. #3
    Advanced Member level 5
    Points: 20,027, Level: 34

    Join Date
    May 2009
    Location
    Prime Meridian
    Posts
    3,020
    Helped
    874 / 874
    Points
    20,027
    Level
    34

    Re: Arduino language vs C best way of learning

    Hi,

    The Uno is so easy, but as you say its not what I class as 'programming' just running other folks precoded routines.

    Seems that precoded modules are the basis of any form of C and in todays large real world programs it is essential to use it that way.

    However if you want to really understand the working of the micro chip architecture in greater detail then perhaps looking at Assembler coding might interest you ?

    Its extremely detailed and can seem difficult at first , but a friend who uses C, did give it a go, and agreed it really taught him so much more, and helped him when he returned to C.

    I have no experience of Assembler on the Atmega chips; not sure how well it is supported either.

    I use the Microchip Pic chips and there are lots of tutorals and help in this and other forums.

    Have a look at this thread where I have just posted some starter code to help someone get their lcd running.
    4 bit lcd interfacing with pic 16f877a entry #11

    Also have a look at these two tutorials, one also does C examples
    Most Pic C compliers have free limited versions and Assembler is totally free.

    http://www.winpicprog.co.uk/pic_tutorial.htm
    http://www.gooligum.com.au/tutorials.html



    •   Alt9th July 2012, 22:34

      advertising

        
       

  4. #4
    Super Moderator
    Points: 44,041, Level: 51
    Achievements:
    Created Album picturesCreated Blog entry7 years registered
    alexan_e's Avatar
    Join Date
    Mar 2008
    Location
    Greece
    Posts
    11,300
    Helped
    2036 / 2036
    Points
    44,041
    Level
    51
    Blog Entries
    6

    Re: Arduino language vs C best way of learning

    Quote Originally Posted by Michael_N View Post
    I started of buying the STK500 kit using avr codevision. But I quickly get stuck, not knowing how to code something, for an example to get a LCD display working.
    If you are using codevision then there are already a lot of libraries included.
    The LCD pins can be set in the wizard and then it is just a matter of a few lines to print your messages.
    Check the LCDDEMO in the example folder of CVAVR

    Alex
    Please don't make requests for help in private using PM. Create a thread in the forum so that other members can benefit from the posted answers.

    Consider reading this before posting : How To Ask Questions The Smart Way



    •   Alt9th July 2012, 23:27

      advertising

        
       

  5. #5
    Member level 2
    Points: 646, Level: 5

    Join Date
    Jan 2012
    Location
    Denmark
    Posts
    44
    Helped
    0 / 0
    Points
    646
    Level
    5

    Re: Arduino language vs C best way of learning

    Hi all,

    Thanks for all of your interesting replies!:)

    Sky_123:
    I will try to find the books you mentioned on Amazone, I think it will be very helpfull with a book.
    Thanks for the pdf document, I will tak a closere look at the code examples later. I already have some material with assignments and some examples how make leds blink, make different sound melodies, and actally how to make drivers. But unfortunally the material is from a school for engineers, so I'm missing the explanation and the basics to solve the the assignments fully.

    WP100:
    I agree with you, Arduino is a bit to easy... It is a shame that it is not more similair to "normal c language"
    I think I have read about Assambler code in the book "C for dummies" To start with I mostly keen on just learning the c language. As assambler code seemed to be very difficult.
    Thanks for the links, even though I program Atmel's and not PIC's the code language should be same, right?

    Alexan_e:
    I have never tried the Wizard, cause a friend of mine told med that it didn't work well... But I will try it and see if I can't get the LCD display to work. I have really been seaching for code or examples of how to use lcd display, and the adc.

    Kind regards
    Michael



  6. #6
    Super Moderator
    Points: 44,041, Level: 51
    Achievements:
    Created Album picturesCreated Blog entry7 years registered
    alexan_e's Avatar
    Join Date
    Mar 2008
    Location
    Greece
    Posts
    11,300
    Helped
    2036 / 2036
    Points
    44,041
    Level
    51
    Blog Entries
    6

    Re: Arduino language vs C best way of learning

    Quote Originally Posted by Michael_N View Post
    I have never tried the Wizard, cause a friend of mine told med that it didn't work well... But I will try it and see if I can't get the LCD display to work. I have really been seaching for code or examples of how to use lcd display, and the adc.
    I'm using it very often to generate the initialization code which I copy to AVRstudio since I use avrgcc , I find it extremely convenient.
    I would be curious of the specific problems that your friend had while using the wizard.

    Alex
    Please don't make requests for help in private using PM. Create a thread in the forum so that other members can benefit from the posted answers.

    Consider reading this before posting : How To Ask Questions The Smart Way



  7. #7
    Advanced Member level 5
    Points: 20,027, Level: 34

    Join Date
    May 2009
    Location
    Prime Meridian
    Posts
    3,020
    Helped
    874 / 874
    Points
    20,027
    Level
    34

    Re: Arduino language vs C best way of learning

    Quote Originally Posted by Michael_N View Post
    , even though I program Atmel's and not PIC's the code language should be same, right?

    Hi,

    They are similar Assemblers but not directly interchangeable.

    Have all look at all types of compliers and go with whichever you can understand more readily - once you have learnt some code you might see that something else which would be better, but by then you will have learnt a lot so its then easier to move onto another complier if needed.



  8. #8
    Member level 2
    Points: 646, Level: 5

    Join Date
    Jan 2012
    Location
    Denmark
    Posts
    44
    Helped
    0 / 0
    Points
    646
    Level
    5

    Re: Arduino language vs C best way of learning

    Hi,

    Well my friend told me that it sometimes didn't make the code the best way. But at the time he attended an education as an engineer, so I guess he had that info from a teacher.

    Sky_123: I have found the books you menioned but there is differents books with the same title.... Do you know the author of the one you mentioned?

    Kind regards
    Michael



  9. #9
    Advanced Member level 4
    Points: 6,315, Level: 18

    Join Date
    Feb 2011
    Posts
    1,170
    Helped
    283 / 283
    Points
    6,315
    Level
    18

    Re: Arduino language vs C best way of learning

    Hi Michael,

    The C book authors are Kernighan & Ritchie for the first book, and Hanly & Koffman for the second.



+ Post New Thread
Please login