Reaction time tester (Help)

Hey guys, so I have been trying to create a working reaction tester using this board as I want to upload the times recorded however I started developing using tinkercad's emulator. I now have a working version of this idea but when recreating it using the hardware I have a few issues I can't seem to resolve.

  • When pressing the button it will light up the onboard LED instead of the LED on the breadboard
  • It records its own time and outputs this into the serial monitor instead of the user tracked time

Here is what I have designed in Tinkercad but instead of the UNO its the MRK 1010.

int buttonPin = 2;           // the number of the push button pin
int ledPin =  3;            // the number of the LED pin
boolean lastButton = LOW;
boolean currentButton = LOW;
boolean Started = false;
boolean timer = false;
long startTime;
long endTime;
long randomTime;
float elapsedTime;

void setup()
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
boolean debounce(boolean last)
  boolean current = digitalRead(buttonPin);
  if(last != current)
    current = digitalRead(buttonPin);
  return current;

void loop()
  currentButton = debounce(lastButton);
  if(lastButton == LOW && currentButton == HIGH)
    Started = !Started;
    lastButton = HIGH;
  lastButton = currentButton;
  if(Started == true && timer == false)
    timer = true;
  if(Started == false && timer == true)
    timer = false;
void Random()
  randomTime = random(4,10);
  randomTime = randomTime*1000;
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin, LOW);

void Start(){
  startTime = millis();
  digitalWrite(ledPin, HIGH);

void Stop(){
  endTime = millis();
  elapsedTime = (endTime - startTime)+5;
  elapsedTime = elapsedTime/1000;
  Serial.print("Time Taken: ");
  digitalWrite(ledPin, LOW);