Go Down

Topic: Newbie Questions (Soz lol) (Read 10567 times) previous topic - next topic

AWOL

#30
Nov 06, 2010, 03:04 pm Last Edit: Nov 06, 2010, 03:04 pm by AWOL Reason: 1
Well, if a '3' in the comparison made it do the thing inside the loop three times, what do you think a '1' in the comparison does?

(please stop typing "lol" all the time - I realise you're probably about 13 years old, but it is incredibly irritating and adds nothing to the communication)
"Pete, it's a fool (who) 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.
I speak for myself, not Arduino.

PaulS

The first part of the for loop is the initialization statement. You are setting i to 0.

The next part determines whether the loop executes, or not. You are saying that the loop should execute while i is less than 1. Since i is an integer, there is only one value for i that satisfies this condition, 0.

The last part defines what to do after each iteration of the loop. In this case, i is incremented by 1.

Your loop will execute exactly once, which means that the loop is completely unnecessary.
The art of getting good answers lies in asking good questions.

rotceh_dnih

well im not sure it was makein it happen 3 times as the power command has a 3 in it also and there are no issue's,so im not sure it made a diff coz it still sometime's skip's channel's so im still not sure what the code dose or if it need's to be there?


oh and im in my 20's with children as i said before i just lack english skill's  8-)

rotceh_dnih

thanks heaps paul ill get rid of it then :)

rotceh_dnih

Hi guy's

im now makeing this on a breadbord without the arduino,just a atmega128 and was thinking about what Korman showed me about inturnal resisters and wish to know if i use that button setup by seting my pin's high will i damage my atmega128 chip? or should i now use resisters?

thankyou very much

Hector

rotceh_dnih

Would someone be nice enough to spoon feed me this info please   :'(

AWOL

"Pete, it's a fool (who) 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.
I speak for myself, not Arduino.

rotceh_dnih

Thank you! But my confusion is am I by setting the Pin High, activating internal resistors within the Atmega chip itself or on the Arduino board?
As I am now not using the Arduino board, I am aware that the code will "work", but not sure if I will be doing damage to the chip as Korman only referred to the Arduino and not the chip.
Thanking you very muchly.

AWOL

#38
Jan 12, 2011, 04:25 pm Last Edit: Jan 12, 2011, 04:26 pm by AWOL Reason: 1
The resistors are internal to the microcontroller, not the Arduino board.
"Pete, it's a fool (who) 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.
I speak for myself, not Arduino.

rotceh_dnih

Thank's man, i really appreciate your help.

Go Up