Pages: 1 [2]   Go Down
Author Topic: for loop is wierd? [solved]  (Read 710 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 303
Posts: 26354
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It depends whether or not the intention is to re-use the value later, perhaps after a loop break.
Or maybe you want to port your code to C.
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.

London, UK
Offline Offline
Jr. Member
**
Karma: 9
Posts: 86
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the overkill, peeps, I was shooting from the hip smiley
Logged

See more 'duino / lego / robotics / electronic stuff on my blog http://philipbowles.com/blog

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the overkill, peeps, I was shooting from the hip smiley
Apology is mine. You were right, although unsigned long would be more appropriate. I only looked at the data posted and a rollover at 1420 loops, but he must have had another rollover earlier already as the total should have been about 96000 odd.

My train of thought was unsigned int due to that and only seeming like 80 more loops required.

 smiley-red
« Last Edit: December 27, 2013, 06:12:49 pm by tack » Logged

London, UK
Offline Offline
Jr. Member
**
Karma: 9
Posts: 86
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No apology required. Uint would have been better learning...we are all here to help each other out, and/ or amuse! Nice to meet u. The guy got sorted, thats what matters.
Logged

See more 'duino / lego / robotics / electronic stuff on my blog http://philipbowles.com/blog

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the replies,
I got the program working and  you guys learned me alot.
much apreciated:)

Malawi
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4267
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[pendant]
Quote
you guys learned me alot
I hope that you were taught something too
[/pedant]
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 617
Posts: 49463
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

[pendant]
Quote
you guys learned me alot
I hope that you were taught something too
[/pedant]
Your opening and closing tags don't match.  smiley-cool
Logged

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

Yeah, you've got a dangling "pendant"
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.

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 114
Posts: 4267
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You two are just being ultra pe(n)dantic, but are right, of course.
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: 1 [2]   Go Up
Jump to: