Pages: [1]   Go Down
Author Topic: imput from keyboard  (Read 426 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm just trying to get started and I was wondering about how to imput data from keyboard. What should I ad to this code in order to ask the operator for the value of delayValue? thanks

int ledPin13 = 13;// LED connected to digital pin 13
int ledPin12 = 12;
int ledPin11 = 11;
int ledPin10 = 10;
int delayValue =1000;

void setup()                    // run once, when the sketch starts
  pinMode(ledPin13,OUTPUT);   // sets the digital pin as output

void loop()                     // run over and over again
  digitalWrite(ledPin13, HIGH);   // sets the LED on
  delay(delayValue);                  // waits for a second
  digitalWrite(ledPin12,LOW);// led 12
  digitalWrite(ledPin11,HIGH); //led 11
  digitalWrite(ledPin10,LOW); //led 10
  digitalWrite(ledPin13, LOW);    // sets the LED off
  delay(delayValue);                  // waits for a second
  digitalWrite (ledPin10,HIGH);
  delay (delayValue);

Pages: [1]   Go Up
Jump to: