Relay logic was reversed

This commit is contained in:
Matt McWilliams 2023-04-12 15:15:41 -04:00
parent 08655898d4
commit 03c27a9226
1 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ const int LED = 8;
const int CAMERA_MOMENT = 240;
//VARIABLES
volatile int cameraFrame = 1200;
volatile int cameraFrame = 2000;
volatile char cmdChar = 'z';
volatile long now;
@ -56,7 +56,7 @@ void pins () {
pinMode(LED, OUTPUT);
pinMode(BUTTON, INPUT_PULLUP);
digitalWrite(CAMERA, HIGH);
digitalWrite(CAMERA, LOW);
digitalWrite(LED, LOW);
}
@ -85,10 +85,10 @@ void camera_direction (boolean state) {
}
void camera () {
digitalWrite(CAMERA, LOW);
digitalWrite(CAMERA, HIGH);
digitalWrite(LED, HIGH);
delay(CAMERA_MOMENT);
digitalWrite(CAMERA, HIGH);
digitalWrite(CAMERA, LOW);
delay(cameraFrame - CAMERA_MOMENT);
digitalWrite(LED, LOW);
}