UK
Offline
Tesla Member
Karma: 89
Posts: 6367
-
|
 |
« Reply #15 on: April 04, 2012, 05:27:00 am » |
When posting code, rather than posting a complex sketch, aim to post the simplest sketch that shows the problem. As a courtesy to the people trying to help you, make sure the sketch actually compiles and demonstrates the problem before you post it, and format the code.
|
|
|
|
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 35
Posts: 5920
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #16 on: April 04, 2012, 09:00:29 am » |
Nice post Nick! My suggestion: Add number to each bold title so I can tell a noob to say read number 6 on the sticky thread about "getting help" and follow the "posting code" suggestion. Or simply issue a 6-5.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #17 on: April 04, 2012, 05:02:18 pm » |
When posting code, rather than posting a complex sketch, aim to post the simplest sketch that shows the problem.
Added this suggestion to the "how to post" list. My suggestion: Add number to each bold title so I can tell a noob to say read number 6 on the sticky thread about "getting help" and follow the "posting code" suggestion.
Now numbered each section.
|
|
|
|
|
Logged
|
|
|
|
|
Cleveland, TN
Offline
Full Member
Karma: 2
Posts: 207
|
 |
« Reply #18 on: April 16, 2012, 03:52:35 pm » |
Jeremy Blum's tutorial series on Youtube is the single most helpful resource for anyone just getting started using the Arduino. I watched all 14 videos twice before I even received my Arduino in the mail. I think everyone should be required to watch those videos before they post a thing: http://www.youtube.com/playlist?list=PLA567CE235D39FA84&feature=plcp
|
|
|
|
|
Logged
|
Luck,
Wade
|
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #20 on: May 07, 2012, 04:28:46 pm » |
Thanks! And I'll add the C++ FAQ Lite: http://www.parashift.com/c++-faq-lite/
|
|
|
|
|
Logged
|
|
|
|
|
Florida, Winter Springs
Offline
Jr. Member
Karma: 0
Posts: 77
|
 |
« Reply #21 on: May 25, 2012, 12:55:32 pm » |
Nice.
|
|
|
|
|
Logged
|
|
|
|
|
Grand Blanc, MI, USA
Offline
Edison Member
Karma: 43
Posts: 2498
"We're a proud service of the Lost Electricity Reclamation Agency"
|
 |
« Reply #22 on: May 25, 2012, 01:42:57 pm » |
I see there is also: http://www.parashift.com/c++-faq/The few pages I checked appear identical between the two. 
|
|
|
|
|
Logged
|
|
|
|
|
Leeds, UK
Offline
God Member
Karma: 35
Posts: 983
Once the magic blue smoke is released, it won't go back in!
|
 |
« Reply #23 on: June 27, 2012, 03:10:22 pm » |
Another thing, if the code being posted is not properly indented, it is a pain to follow. Press "tools->auto format" in the IDE first as it makes it far easier to understand 
|
|
|
|
|
Logged
|
~Tom~
|
|
|
|
Offline
Sr. Member
Karma: 0
Posts: 451
I am a amateur.
|
 |
« Reply #24 on: July 04, 2012, 11:49:51 am » |
In section 5 of your link, it says that you have to declare the functions first. Why don't I have to do that in Arduino?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 137
Posts: 19045
I don't think you connected the grounds, Dave.
|
 |
« Reply #25 on: July 04, 2012, 11:51:39 am » |
Because the Arduino pre-preprocessing does it for you, most of the time. Sometimes, like functions with references as parameters, it doesn't work too well.
|
|
|
|
« Last Edit: July 04, 2012, 11:56:58 am by AWOL »
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Sr. Member
Karma: 0
Posts: 451
I am a amateur.
|
 |
« Reply #26 on: July 04, 2012, 02:46:57 pm » |
Sometimes, like functions with references as parameters, it doesn't work too well.
I once did this: void timer(unsigned long interval, void (*g)()){ //... }
and got compiler errors unless I write the function before it is used.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #28 on: August 05, 2012, 09:11:47 pm » |
Post your code! Please change that to "Post your complete sketch!" Too many people post snippets of code that have nothing to do with the actual problem.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #29 on: August 05, 2012, 10:20:18 pm » |
Done. I added a clarification that a sketch is a program/code.
|
|
|
|
|
Logged
|
|
|
|
|
|