So the code works...ish. It leaves the laser on for some time then it goes off. WHen you hit the button it leaves it for the short amount of time expected then off. After a short pause it then comes on again and stays on for a while. The exact code works on my UNO but not on this...
void loop() {
buttonState = digitalRead(trigger);
if (buttonState != lastButtonState) { //on pull of trigger
if (lastButtonState == HIGH){
digitalWrite(laser, HIGH);
delay(85);
digitalWrite(laser, LOW);
delay(10);
}
lastButtonState = buttonState;
}
}