Go Down

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

bibre

Quote

My long-after impression is that Snobol lacked the flexibility I wanted/expected.


I agree. And also it was difficult, at least for me, to understand programs written by others. Snobol is the strangest prog language I've ever seen.

I wrote a small DBMS program in PL/I but never got to use PL/C. So, you designed it, congratulations!  8)
Billy     http://www.z-world.com/operations/gbremer/

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

CrossRoads

APL is pretty odd also. I knew a couple guys in high school who did some.
Here's an example found at Wikipedia:

The following function "life", written in Dyalog APL, takes a boolean matrix and calculates the new generation according to Conway's Game of Life. It demonstrates the power of APL to implement a complex algorithm in very little code, but it is also very hard to follow unless one has an advanced knowledge of APL.

life?{?1 ??.?3 4=+/,¯1 0 1?.?¯1 0 1?.???}
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nick Gammon

Quote
... but it is also very hard to follow ...


Which kind-of explains why it didn't take off.
http://www.gammon.com.au/electronics

bibre

Wow, I had completly forgotten APL, "A Programming Language" or something like that??? Never understood it.

And there was also Lisp... Never understood it either.   :)
Billy     http://www.z-world.com/operations/gbremer/

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

AWOL

Ah yes! An APL account with IP Sharp was a much prized thing, even if it was pretty much a write only language.
A vector average came in at about 9 keystrokes, IIRC.
"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.

retrolefty

Quote
And there was also Lisp... Never understood it either.  


Power language I've read, but very hard on the (((((( and )))))) keys, requiring keyboard replacement every six months.

Lefty


pluggy

Just look at some of the simple example sketches in the IDE, if you have any idea at all, you'll soon pick it up.  I'd done nothing with C derivative languages until Arduino
http://pluggy.is-a-geek.com/index.html

westfw

Quote
Sorry for interrupting the conversation

Eh?  What's that sonny?   Sorry; the mind wanders a bit...  :-)

Quote
to learn C/C++ should you use a book that has the Arduino structure or use a Standard Programming language book?

This is actually a hard question, especially if you goal is to program Arduinos.   C++ is a "big" language not usually associated with small microcontrollers, and the typical C++ book is likely to start with a "hello world" program that opens a window and "paints" some text.  Then it will go on to describe out to use a whole bunch of standard desktop Windows classes/libraries that aren't relevant in a microcontroller.  Arduino uses a very small subset of the features of C++ (at least, in ways visible to users), and has libraries that are mostly very different from those you would use on a desktop.

A C text would probably be slightly better, because it doesn't easily support the complexity of the desktop environment (that's sort of why there is C++!)

An "embedded C" text would likely include a lot about things that the Arduino environment specifically hides from you.

I would suggest perhaps one of the very early "C language" books (K&R, even.  From the days before windows!) in combination with an Arduino text.  Either read the C language stuff and find out how it is usually applied to Arduino, or read the Arduino text and use the C book to get more information on the language constructs that are used...

AWOL

Kelley and Pohl's A Book On C is quite readable, and contains notes on C++, but even that sometimes assumes quite large amounts of RAM
"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.

jrmc114064

Went to BN and found C++ for dummies and considered buying it until i heard westfw on the subject. I have seen books on the internet that are specifically on the subject of programming Arduino's. The book is Beginning Arduino Programming, offered from BN.com. Does it show much promise or should i pick another.
Certified Beginner

oric_dan

Quote

Went to BN and found C++ for dummies and considered buying it until i heard westfw on the subject. I have seen books on the internet that are specifically on the subject of programming Arduino's. The book is Beginning Arduino Programming, offered from BN.com. Does it show much promise or should i pick another.


Wow, with the thread replies here, you've been around 3 or 4 different blocks in regards programming
languages.

If you're committed to getting into the Arduino, as opposed one of many other embedded controllers,
then you'll want to start by learning plain vanilla  "C", and not C++ or Basic or anything else as your
initial language. Trying to start out with C++ is really overkill. If you ever do need it, you can pick it
up later. The Learning Curve means one-step-at-a-time.







Nick Gammon

Yes, true, get vanilla C under your belt. But the IDE uses C++, and some things (like the Serial object) are instances of a class, so you eventually need to know at least the basics of classes.
http://www.gammon.com.au/electronics

Daanii

Since the Arduino is a microcontroller, you will probably use only a small number of the simpler C commands. You will also need to know special commands for the Arduino that no book on C is going to teach you.

So I would just get a tutorial and just start setting up circuits and coding. Here is the one I used: www.earthshineelectronics.com/files/ASKManualRev5.pdf That will teach you how to program in C faster than any book out there.

As Nick Gammon says, at some point you may want to move from using just C to some of the more powerful C++ data structures. But there is plenty of time to do that.

So forget the books. Dive in and start doing. Learn from that.

jrmc114064

Sorry for ignoring Daani, but i was really hoping to get a book before i even touched Arduino hardware. Never the less, i am still searching for that book and found that some books are written in Objective C is that different than C or is it mearly another language.
Certified Beginner

dxw00d

Objective C is mostly used on Apple hardware, it is an alternative OO extension set to  C.

Go Up