Hi Guys, I have to admit to myself I will never be a programmer, too complicated for me .
I only wanted the Arduino Board for one project and one project only ( to do with music and keyboard )
I have followed everyones advice and searched past posts for information on how to include " while() " in my code.I have checked with Arduino NoteBook v1-1 but its interpretation and implementation is a little
vague and not enough detail.I have always been a faily logical person, but I feel working with Arduino requires something more than logic, maybe I am not thinking outside the square. Anyhow guys, perhaps you can help me by giveing me ( precisely ) a few lines of of code to keep me with my project. As mentioned in my past posts, I have a simple array of LEDs on, off, etc,at some stage in the code I want to be able to "wait" or "hold" the run , then restart with a pushbutton "input" ( James has suggested I use " while() loop ).This I have Tried with no luck. Here is a part of my code with the bit in the middle missing. Could someone PLEASE fill in the gap.I would be very grateful. Cheers, Chez7.
// Example 01 : Blinking LED
//
// Copy and paste this example into an empty Arduino sketch
#define LED 13 // LED connected to
// digital pin 13
void setup()
{
pinMode(LED, OUTPUT); // sets the digital
// pin as output
}
void loop()
{
digitalWrite(LED, HIGH); // turns the LED on
delay(2000); // waits for a second
digitalWrite(LED, LOW); // turns the LED off
delay(2000); // waits for a second
}
while() loop ; // from here I want to delay the programme until I pushbutton an " input".
Pushbutton input; // After this input, programme cotinues on its run.
Digital Write ( LED, HIGH);
delay (2000);
Etc
Etc