Go Down

Topic: Does Arduino support both BASIC and C language (Read 4165 times) previous topic - next topic

jrmc114064

First dip into the programming language and was wondering which language Arduino supports
Certified Beginner

pYro_65

It is C++, which is a super-set of C

BASIC code wont work.

C++ allows inline asm too.

jrmc114064

Certified Beginner

pYro_65

http://en.wikipedia.org/wiki/Assembly_language

westfw

The Arduino environment provides essentially "C" programming capabilities.
The Arduino hardware is capable of running any number of languages, including BASIC, given suitable software on the host side, or some kind of interpreter loaded into the CPU.  One interpreter providing a BASIC-like syntax is Bitlash
I'm not aware of any BASIC vendors (or OSSW) that specifically provides Arduino HW support for their system...

jrmc114064

If I want to do this learning process of learning the languages I'd programming do I need to learn them in some sort of  order from BASIC to C or do I just need to learn that one language
Certified Beginner

pYro_65

The Arduino IDE uses GCC so read C++ texts.
Also the Arduino reference and tutorials.
The arduino based stuff is the way to go, if you already know programming concepts, you can pick up the syntax in the tutorials and reference examples.

http://arduino.cc/en/Reference/HomePage
http://arduino.cc/en/Tutorial/HomePage
http://www.cplusplus.com/doc/tutorial/

wildbill

The Arduino is programmed in C/C++. You need not learn BASIC to use it.

Graynomad

Well as the name implies BASIC is easier to learn. At the risk of steering you away from Arduino the DuinoMite boards

http://olimex.com/dev/index.html

Can be programmed directly in BASIC.

However if you learn C that's a way more powerful language than any BASIC you are likely to find on a $35 board, C is harder to learn but the process is simplified a lot by using an Arduino and there are 100s of people on this forum that will help.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

westfw

Quote
as the name implies BASIC is easier to learn.

I don't actually believe that to be true.  Originally, an interactive BASIC interpreter was MUCH easier to use than a batch FORTRAN or COBOL compiler.  And most BASICs probably give you better error messages when you've done something wrong (a particular weakness of C/C++.)  But overall "easier" ??  Nah...

Graynomad

#10
Mar 08, 2012, 10:53 pm Last Edit: Mar 08, 2012, 10:55 pm by Graynomad Reason: 1
Quote
interactive BASIC interpreter

That's the sort of thing you get with the DuinoMite-style boards and I think that would be easier than the way we used to learn C, ie with no forums, a cross-compiler, and a screen with

main() {

}

written on it. Hmmm now what?

But yes these days with the Arduino you don't have that problem as there are many examples that work out of the box so it's easy to start with say the blink example and play with it to get an idea of how C works. Then work your way up asking questions along the way.

Bottom line then, learn C.

PS: has the original post changed, it no longer mentions BASIC.

_____
Rob

Rob Gray aka the GRAYnomad www.robgray.com

jimford

Who was the computer scientist (Donald Knuth?) that said that someone that learned BASIC as a first language was forever  ruined for becoming a 'proper' programmer!

Jim

westfw

Dijkstra.  In 1975.  I doubt that you'll find a modern BASIC implementation that is quite as bad as the BASICs of 1975.  And he seems to have been rather equally dismayed by most of the other languages of the time.  Except ALGOL...

http://en.wikiquote.org/wiki/Edsger_W._Dijkstra

(Hmm.  I'll bet that there is less Algol written today than Fortran or Cobol or BASIC.  But that's because many newer better languages were derived from Algol, but didn't keep the name...)

bibre

Circa 1970

Did anybody hear about or use Snobol. That was a cool language for manipulating strings by using "pattern matching". You can still get it for free as Snobol4, a version for the PC, he, he.   8)
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

westfw

I heard of it, but I preferred TECO.  :-)

Go Up