Need of a language

Thread Starter

wanttobeanewb

Joined Dec 1, 2013
5
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
 

MaxHeadRoom

Joined Jul 18, 2013
28,702
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.
 

tshuck

Joined Oct 18, 2012
3,534
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...
 

Thread Starter

wanttobeanewb

Joined Dec 1, 2013
5
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
 

tshuck

Joined Oct 18, 2012
3,534
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
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...
 

ErnieM

Joined Apr 24, 2011
8,377
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.
 

mcgyvr

Joined Oct 15, 2009
5,394
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)
 
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
 

Thread Starter

wanttobeanewb

Joined Dec 1, 2013
5
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?

Rich (BB code):
Integer Input
PRINT "type an integer"
INPUT DATA%
PRINT DATA% * 2
END

                                       Status
Name already in use on line 3
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
 

bertus

Joined Apr 5, 2008
22,278
Hello,

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

Rich (BB code):
' Integer Input
PRINT "Type an integer"   'Ask the user for an integer
INPUT DATA%               'Get it from the keyboard, put it in DATA%
PRINT DATA% * 2           'Print twice the number.
END
Without the ' sign the text input will probably been declared as variable.

Bertus
 

Thread Starter

wanttobeanewb

Joined Dec 1, 2013
5
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.

Rich (BB code):
'Integer input
PRINT "Type an integer"
INPUT DATA%
PRINT DATA% * 2
END
This time i coped and pasted it. ;)
 

djsfantasi

Joined Apr 11, 2010
9,163
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.
 
Top