Temple, Texas
Offline
Sr. Member
Karma: 14
Posts: 354
|
 |
« Reply #30 on: January 26, 2013, 12:08:47 pm » |
John thanks for the second link, I've done a copy and paste Here is an example of countdown using a for loop: 1234567891011 // countdown using a for loop #include <iostream> using namespace std; int main () { for (int n=10; n>0; n--) { cout << n << ", "; } cout << "FIRE!\n"; return 0; }
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, FIRE! I don't think there is a better way to learn then to see an example of how its done. Actually that is an example showing a case where the braces are not required, sorry <shrug>. You only really need a "compound statement" aka "block" (with the braces) , as a way of putting more than one statement as part of your loop. But in this case they don't hurt, and are even recommended by many (because it doesn't hurt for a block to have only one statement). It is explained more thoroughly at the top of that page. Here is my working code: with better comments
Awesome, glad its working better now! John I was looking Jeremy Blum vid on youtube and seen a familiar name in the recommendations John NYCCNC is that you?
No, 'fraid not Cheers, John
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 20
|
 |
« Reply #31 on: January 28, 2013, 05:42:34 pm » |
Thanks for all the people that have helped (mainly John) on this project and those that have been less than, why bother posting a reply. I did try to get the button code working but it's way beyond me, After researching around I found the best example was in the examples/digital/state change detection. I did try and hack this code into my prog but have admitted defeat.
Kind regards
Dale
|
|
|
|
|
Logged
|
|
|
|
|
Des Moines, WA - USA
Offline
God Member
Karma: 21
Posts: 707
|
 |
« Reply #32 on: January 28, 2013, 05:49:24 pm » |
With the hope you check back here several more times ...
I don't know much about you but myself I do a lot of my problem solving in the background when I'm not giving any conscience effort to it - usually while sleeping.
My suggestion is not to admit defeat but simply set it aside for awhile relax some and come back to it at a later date.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35566
Seattle, WA USA
|
 |
« Reply #33 on: January 28, 2013, 05:50:39 pm » |
Thanks for all the people that have helped (mainly John) on this project and those that have been less than, why bother posting a reply. It's hard to know what will help a person. Sometimes a hint or a gentle nudge or a bit of encouragement is all that a poster needs. Sometimes the poster needs to have there hand held for a while. If you try holding someone's hand when all they need is a hint, they don't like it. If all you give is a hint to someone that needs there hand held for a while, they don't like it. You need to remember that the pay here isn't all that great. We're all volunteers. Sometimes that works; sometimes it doesn't. If the project is important to you, and is beyond your skill set, you have two choices. Expand your skill set (learn!) or head over to Gigs and Collaboration, and offer to pay for the help you need. Whining about people that try to help is not the correct answer.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 20
|
 |
« Reply #34 on: January 28, 2013, 06:10:58 pm » |
This forum is for help and is unique from all others I have used, in that the amount of comments posted that are unhelpful. If somebody asks for a hint then give them a hint, it's that simple. but most on here are noobs asking for help. You need to remember that the pay here isn't all that great. We're all volunteers. Sometimes that works; sometimes it doesn't.
If the project is important to you, and is beyond your skill set, you have two choices. Expand your skill set (learn!) or head over to Gigs and Collaboration, and offer to pay for the help you need.
I've got a few "how to" videos on youtube machining related, but I'm not asking a payment for them, just done it to help others. This is what makes the internet great, expanding people's minds. Regards Dale
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35566
Seattle, WA USA
|
 |
« Reply #35 on: January 28, 2013, 06:42:32 pm » |
If somebody asks for a hint then give them a hint, it's that simple. but most on here are noobs asking for help. The problem is that someone that just needs a hint or a nudge asks for help. Someone that needs their hand held for a while asks for help. How are we to decode "I need help"? How would you feel if, after watching one of your videos, a viewer posted a comment that said "Well, that wasn't helpful at all"? I'm sure that you would think "Well, so what? You got what you paid for! Other people appreciated it.".
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 20
|
 |
« Reply #36 on: January 28, 2013, 06:45:22 pm » |
Paul this could go on for a long time, which you have a lot of.
Logging out
Dale
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1586
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #37 on: January 28, 2013, 06:58:32 pm » |
@arduinodale Paul this could go on for a long time, which you have a lot of.
Logging out
Dale That was uncalled for. Everyone who took the time to look at your post and comment, tried to help. We all deserve some gratitude. those that have been less than, why bother posting a reply. Appearently everyone's comments but johncc, were not what you needed, so then i'll go ahead and get rid of mine. Why bother posting a reply, right? Edit: Previous post removed.
|
|
|
|
« Last Edit: January 29, 2013, 08:08:04 am by HazardsMind »
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
|