Need of a language

Discussion in 'Programmer's Corner' started by wanttobeanewb, Dec 3, 2013.

  1. wanttobeanewb

    Thread Starter New Member

    Dec 1, 2013
    5
    0
    Hi,
    Automation- temperature controls fascinates me. I am going to learn how to do this, not the first floor but the footing for the foundation, even it takes years. My goal is to build a control board- microprocessor, gate, diode, or whatever. Write a very basic program that will blink a light. This program stuff is new to me. I have found out that there are a lot of languages out there. So i was wondering does anyone have any suggestions of a language and a light weight book to use for a first timer? I have winxp.

    Thank you very much.:D

    wanttobeanewb
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Perhaps the Arduino system might work you
    http://arduino.cc/
    It is cheap as long as you stay away from getting those expensive shields. You have other options to also.
     
    wanttobeanewb likes this.
  3. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    If you want to go the Picmicro route there is a MicroChip lab board Picdem-2 that has pretty much all the features on board I/O, Usart, I2c, analogue temp sensor, audio, LCD display, sockets for 3 IC's. for 16F 18F etc.
    With the free MPLAB you can use Assembler or C.
    Tutorial for the 16F at the Nigel Goodwin Tutorial site.
    Max.
     
    wanttobeanewb likes this.
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I would recommend that you learn some programming language (e.g. C, C++, BASIC, etc.) apart from an embedded context. Learning how to program on a computer helps you understand where idiosyncrasies appear in an embedded implementation of a given language and allows you to quickly move to different compilers/languages comparatively easily. Programming languages are pretty similar - being well oriented in one language sets you up to take to another easier.

    All that said, I would second the call that you could use the Arduino as there are hundreds of tutorials and a huge amount of resources to help you along. You probably could learn programming on the Arduino, but it will likely be more difficult than it would otherwise...
     
    wanttobeanewb likes this.
  5. wanttobeanewb

    Thread Starter New Member

    Dec 1, 2013
    5
    0
    Thank you all so much, I will check into all that.
    If I install C++ Code Blocks, is that all I will need to start learning the language, no other software?
    thx
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    From my quick search of what Code::Blocks is ( a C++ IDE, which I assume has a compiler too), it is enough.

    Really, all you need is a text-editor and a compiler - an IDE makes it easier though...
     
    wanttobeanewb likes this.
  7. wanttobeanewb

    Thread Starter New Member

    Dec 1, 2013
    5
    0
    Hi,
    Working on syntax, when i get stuck i will be back.
    Thank for your help.

    wanttobeanewb
     
  8. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The BASIC language is a typical good place for people to start. BASIC (an acronym for Beginner's All-purpose Symbolic Instruction Code) was designed to be simple for a beginner to grasp.

    To this day a huge amount of useful work is still done in C. It is my language of choice for micro work, I do not recommend it as a starting language. It is not an impossible start, but Basic is kinder and gentler, whereas C will let you shoot yourself in the foot all you want.

    For various reasons (mostly lack of RAM) C++ is not used much inn miros, and never in the smallest ones.

    A C compiler can usually be obtained via a free download. Basic costs a small amount from some sources. C++ is costly.
     
    wanttobeanewb likes this.
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    wanttobeanewb likes this.
  10. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    I third the Arduino..
    There are thousands of tutorials/videos,etc.. all over the place on just about anything you would want to make and there are hundreds of "shields" for it (add on boards that extend the functionality without having to build a PCB/schematic yourself)
     
    wanttobeanewb likes this.
  11. MikeLalonde

    New Member

    Dec 8, 2013
    6
    1
    I use Arduino myself... if you know BASIC, c++ is not all that different. It took me about 4 months to learn C++. Wrote some software for my wife's business.

    Michael Lalonde
    Sudbury Ontario
     
    wanttobeanewb likes this.
  12. wanttobeanewb

    Thread Starter New Member

    Dec 1, 2013
    5
    0
    Hi,
    I was looking through the - Programmed lessons in QB- and I cannot figure out what I am doing wrong at chp4/p8. It gives some examples to do which have been fine but the last one on this page where I use the variable – DATA% - will not create an EXE. File or start the program, but at the bottom of the IDE in the status bar I get the message: Name already in use on line 3. Could it be that - Programmed Lessons in QBasic – is for an older version IDE, your thoughts?

    Code ( (Unknown Language)):
    1. Integer Input
    2. PRINT "type an integer"
    3. INPUT DATA%
    4. PRINT DATA% * 2
    5. END
    6.  
    7.                                        Status
    8. Name already in use [B]on line 3[/B]
    QBASIC IDE
    www.qb64.net/

    Programmed Lessons in QBasic
    chortle.ccsu.edu/QBasic/index.html

    chapter 4 / the input statement/page 8
    chortle.ccsu.edu/QBasic/chapter04/bc04_8.html

    Thank You
     
  13. bertus

    Administrator

    Apr 5, 2008
    15,647
    2,346
    Hello,

    You forgot the ' sign at the first line.
    This is what is stated on the lessons page:

    Code ( (Unknown Language)):
    1.  
    2. ' Integer Input
    3. PRINT "Type an integer"   'Ask the user for an integer
    4. INPUT DATA%               'Get it from the keyboard, put it in DATA%
    5. PRINT DATA% * 2           'Print twice the number.
    6. END
    7.  
    Without the ' sign the text input will probably been declared as variable.

    Bertus
     
  14. wanttobeanewb

    Thread Starter New Member

    Dec 1, 2013
    5
    0
    Sorry Bertus,
    Excuse my ignorance, I typed it wrong here not in the QB64 IDE. The grave accent was and is in place but it will not run.

    Code ( (Unknown Language)):
    1. 'Integer input
    2. PRINT "Type an integer"
    3. INPUT DATA%
    4. PRINT DATA% * 2
    5. END
    6.  
    This time i coped and pasted it. ;)
     
  15. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    You may have a different version/platform than the tutorial. IMHO, the code should not work, because your variable name DATA% is the same as the reserved word DATA. Try changing the name to something like DAT% and see if you get different results.
     
Loading...