Pages: 1 2 [3] 4 5   Go Down
Author Topic: Does Arduino support both BASIC and C language  (Read 3813 times)
0 Members and 1 Guest are viewing this topic.
Monterrey, N.L. México
Offline Offline
Full Member
***
Karma: 1
Posts: 154
Model Railroading & Arduino are Fun
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley-cool
Logged

Billy     http://www.z-world.com/operations/gbremer/

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 549
Posts: 27434
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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∘.⌽⊂⍵}
Logged

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.

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19363
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Which kind-of explains why it didn't take off.
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Monterrey, N.L. México
Offline Offline
Full Member
***
Karma: 1
Posts: 154
Model Railroading & Arduino are Fun
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.   smiley
Logged

Billy     http://www.z-world.com/operations/gbremer/

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 137
Posts: 6805
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26632
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"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.

South Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Certified Beginner

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2927
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.






Logged

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19363
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Northern California (by San Francisco)
Offline Offline
Sr. Member
****
Karma: 3
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

South Texas
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Certified Beginner

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: 1 2 [3] 4 5   Go Up
Jump to: