Adjust timings in the jkfirmware

This commit is contained in:
M McWilliams 2018-01-30 05:05:04 -05:00
parent 0a28c84ef9
commit 9bbf2393b7
2 changed files with 40 additions and 6 deletions

View File

@ -6,6 +6,40 @@
"board" : "uno", "board" : "uno",
"serialDelay" : 20, "serialDelay" : 20,
"sequenceDelay" : 100, "sequenceDelay" : 100,
"profiles" : {
"jk_original" : {
"cam" : {
"time" : 750,
"delay" : 50,
"momentary" : 300
},
"proj" : {
"time" : 1300,
"delay" : 50,
"momentary" : 300
},
"black" : {
"before" : 250,
"after" : 250
}
},
"jk103" : {
"cam" : {
"time" : 600,
"delay" : 50,
"momentary" : 240
},
"proj" : {
"time" : 950,
"delay" : 50,
"momentary" : 240
},
"black" : {
"before" : 0,
"after" : 0
}
}
},
"cam" : { "cam" : {
"time" : 750, "time" : 750,
"delay" : 50, "delay" : 50,

View File

@ -22,8 +22,8 @@ boolean debug_state = false;
const int CAMERA = 2; const int CAMERA = 2;
const int CAMERA_FWD = 3; const int CAMERA_FWD = 3;
const int CAMERA_BWD = 4; const int CAMERA_BWD = 4;
const int CAMERA_MOMENT = 200; const int CAMERA_MOMENT = 240;
const int CAMERA_FRAME = 800; const int CAMERA_FRAME = 600;
//CAMERA VARIABLES //CAMERA VARIABLES
boolean cam_dir = true; boolean cam_dir = true;
@ -31,8 +31,8 @@ boolean cam_dir = true;
const int PROJECTOR = 8; const int PROJECTOR = 8;
const int PROJECTOR_FWD = 9; const int PROJECTOR_FWD = 9;
const int PROJECTOR_BWD = 10; const int PROJECTOR_BWD = 10;
const int PROJECTOR_MOMENT = 200; const int PROJECTOR_MOMENT = 240;
const int PROJECTOR_FRAME = 800; const int PROJECTOR_FRAME = 950;
//PROJECTOR VARIABLES //PROJECTOR VARIABLES
boolean proj_dir = true; boolean proj_dir = true;
@ -152,7 +152,7 @@ void proj_start () {
digitalWrite(PROJECTOR, HIGH); digitalWrite(PROJECTOR, HIGH);
delay(PROJECTOR_MOMENT); delay(PROJECTOR_MOMENT);
digitalWrite(PROJECTOR, LOW); digitalWrite(PROJECTOR, LOW);
delay(PROJECTOR_FRAME); delay(PROJECTOR_FRAME - PROJECTOR_MOMENT);
proj_stop(); proj_stop();
} }
@ -160,7 +160,7 @@ void cam_start () {
digitalWrite(CAMERA, HIGH); digitalWrite(CAMERA, HIGH);
delay(CAMERA_MOMENT); delay(CAMERA_MOMENT);
digitalWrite(CAMERA, LOW); digitalWrite(CAMERA, LOW);
delay(CAMERA_FRAME); delay(CAMERA_FRAME - CAMERA_MOMENT);
cam_stop(); cam_stop();
} }