Go Down

Topic: Help needed for code!!!! [ASAP] (Read 6373 times) previous topic - next topic

estrzy27

No, I did not copy that part of the code. I copied everything underneath that section.

nickgammon


I copied everything directly from the link I posted.


...


No, I did not copy that part of the code.


So you didn't copy everything.
Please post technical questions on the forum, not by personal message. Thanks!

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

estrzy27


bryantb

It looks like when you removed the header comment that you left the closing block quote. This line is messing you up:

Code: [Select]

*/


You didn't fully remove the original authors comment at the beginning of the code that you lifted.

Personally I think that you should leave the original comments and especially the original authors names and then add your own comments that describe your changes. This is not only proper etiquette but it can be very useful to you personally when trying to track down the origins of the code that you are using.

AWOL

When I reposted the code in your first post, I was very careful to preserve it as you had posted it.
I just copied it into the Arduino IDE, deleted two characters, and it compiled.

estrzy27


When I reposted the code in your first post, I was very careful to preserve it as you had posted it.
I just copied it into the Arduino IDE, deleted two characters, and it compiled.



I copied the code exactly without changing anything except for removing one of the } at the end of the code, is what what you were referring to in reply #3?
If it is, I still received an error message:

sketch_nov25b.cpp: In function 'void blinkLED(byte, int, int)':
sketch_nov25b:139: error: expected `}' at end of input

nickgammon

Re-read reply #3. Does he suggest deleting a "}" at the end of the code? Can you quote that part?
Please post technical questions on the forum, not by personal message. Thanks!

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

estrzy27

I wasn't sure what they meant, so after taking out the } and having that not work, I figured it was the */

arcs_n_sparks

You gentlemen are all too kind. This question on the AVR Freaks board would have had a much more severe response (appropriately so). This is not the place to get homework done and evade simple questions.

nickgammon

Ach, we do try to be helpful, but also to encourage people to think for themselves. We were all beginners once. :)
Please post technical questions on the forum, not by personal message. Thanks!

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

AWOL

#25
Dec 02, 2011, 08:27 am Last Edit: Dec 02, 2011, 08:59 am by AWOL Reason: 1
Quote
You gentlemen are all too kind.

I try to tread the centre line between spoon-feeding (waste of everyone's time, IMO) and telling them to RTFM.
Sometimes, in frustration, I do resort to the spoon, just to shut them up.

(Though I do admit that "ASAP" or "URGENT!!" in a thread title is a bit of red rag to this particular bull)

Go Up