#define STARTBUTTON 2
#define DIRECTIONBUTTON 3
#define REDLED 4
#define GREENLED 5
#define DIAL A0
int calculatedDelay = 100;
void setup() {
// put your setup code here, to run once:
pinMode(STARTBUTTON, INPUT);
pinMode(DIRECTIONBUTTON, INPUT);
pinMode(REDLED, OUTPUT);
pinMode(GREENLED, OUTPUT);
pinMode(DIAL, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int buttonVal = digitalRead(BUTTON);
int dialVal = analogRead(DIAL) / 17; // convert the number to a minute value from zero to 60
delay(calculatedDelay);
}
void start(){
// calculate the delay required for the loop and set
// turn led green
// move to starting position
moveToStartPosition();
// set the display
setDisplay();
}
void stop(){
// turn led red
}
void moveToStartPositon(){
// work out the starting position based on diection
// move the slider to the position
}
void setDisplay(){
// clear the screen
// update remaining time
// update position
// update elapsed time
// display an arrow showing direction of travel
showDirectionOfTravelArrow();
}
void moveSlider(){
}
void showDirectionOfTravelArrow(){
}