Pages: 1 2 [3]   Go Down
Author Topic: Getting Started With Arduino and C  (Read 2086 times)
0 Members and 1 Guest are viewing this topic.
Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 632
Posts: 34510
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
@Grumpy_Mike...
Re-read section 4 of the C Ianguage Standard
No, I have much better things to do with my time than jump through software politically correct hoops deciding if something is or isn't part of a core language. In my book if it needs an include file then it isn't period. Most of C is written in C and has to be added later. It was designed like that and has developed like that. If I was in to compiler writing then yes the standard would be important, but I am not and I have no need to.

There is a myth that C is portable, this was never true, it isn't true and it will never be true. Sure it is quite portable but in any real system you will always have to change something to get it to run on another system, or even the same system but another environment.

Without being personal, as I have never had to work with you, I have had to manage people who show this attitude to standards. They have been all, without exception, very good at the nit picking, and hopeless at actually getting stuff to work correctly in the space allotted, and the speed required, on any given processor.

The simple fact that I/O is at different addresses on different processors means there is always going to be some fettling needed when switching processors. Couple that with different types of built in hardware, UARTS, I2C, SPI, A/D, D/D and other such goodies completely knocks on the head the concept of portability at the level the OP is asking about.

Quote
Since that acid test eliminates all standard functions
Standard functions are what they say standard functions, not part of the core language.
Logged

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

I wrote perfectly valid, executable C for many years without ever once encountering or writing a "main" or an "exit" - there are places, after all, where there is no place to "exit()" to!

Quote
Standard functions are what they say standard functions, not part of the core language.
Amen.
« Last Edit: February 15, 2012, 05:35:06 am by AWOL » 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.

West Des Moines, Iowa USA
Offline Offline
Sr. Member
****
Karma: 2
Posts: 428
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm certainly glad to have all this straightened out...
...and now I see why the Arduino needs a reset button.

I'd been wondering about that.  smiley-neutral
Logged

There's always a better way!

Tucson, AZ
Offline Offline
Sr. Member
****
Karma: 8
Posts: 317
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Back to your original question. The best way to go is to buy a book. Preferably the one I wrote called 'Programming Arduino: Getting Started with Sketches'.
A search on Amazon will find you all sorts of good C programming books and if you know C#, you will not find it hard. But you will end up writing code where function names start with a capital - curse you Bill Gates!
Books are distilled knowledge! Save yourself some time.

I second the acquisition of 'Programming Arduino: Getting Started with Sketches'.  I have learned more from that one book than any other.
Logged

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