Go Down

Topic: Problem with my first sketch (Read 817 times) previous topic - next topic

UKHeliBob

Quote
That is the good answer for loop() though the Language Reference has it under 'Structure'

Isn't that the point though ?  loop() and setup() are part of the structure of the language.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Nick Gammon


But then I come back to the point I made earlier, that saying so in the definition of 'loop()' in the Language Reference would cost nothing and help the beginner who is the only one ever to go there.


You've got a point, and being someone who came from a programming background, but not the Arduino (years ago), when I looked at sketches I wondered:


  • Where is "main"?

  • What do "setup" and "loop" do?



The answer as I now know is that the "simplified" the environment by providing their own "main" which calls "init", then "setup" and then "loop" repeatedly.

I suppose this simplifies it for beginners, and without that you would have to teach everyone to call "init" otherwise timers and stuff like that would not be set up properly.

robgraham

I'm leaving this thread now, bruised by some of the comments and somewhat chastened.  Having raised the question of just where it said so, I didn't expect the comments from most of the contributors, with possibly too much knowledge of the subject, to be so lacking in support for someone starting out, some particularly which I found harsh and critical.

Whereas my questions have been answered this time, I hope I can get through the rest of my project without having to return here; I will perhaps find another forum with users who aren't software gurus as I feel you all are.

One of the biggest failings of technical forums is the ability of the contributors to think down to the level of the original poster - they have all been there and now know it all.  I've been on both sides of the fence and this has been a bad example of being on no-knowledge side for me.

AWOL

Quote
One of the biggest failings of technical forums is the ability of the contributors to think down to the level of the original poster
it's a technical forum, not a classroom, and we're not all teachers.

Quote
I will perhaps find another forum with users who aren't software gurus as I feel you all are.
Perhaps you will.
"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.

Nick Gammon


I hope I can get through the rest of my project without having to return here; I will perhaps find another forum with users who aren't software gurus as I feel you all are.


I'm sorry you feel that way, and hope you find a friendlier forum. Bear in mind though that your second post in this thread took a rather aggressive tone:


But how the H*** is one meant to know these two facts ...


A lot of us answer question after question here, many of which are well-covered in the tutorials and example files. That's OK, I suppose, not everyone reads them. But when posters start to complain about how badly everything is run, it can tend to get peoples' backs up.

We are unpaid volunteers you know, and the documentation is, as far as I know, not open to us to edit.

Go Up