connect camera, trivial shutter test in run menu
This commit is contained in:
parent
a49c234a8c
commit
7b31c7d0ec
@ -36,8 +36,9 @@
|
|||||||
// stepper motor
|
// stepper motor
|
||||||
#define PIN_STEPPER_DIR A1
|
#define PIN_STEPPER_DIR A1
|
||||||
#define PIN_STEPPER_STEP A2
|
#define PIN_STEPPER_STEP A2
|
||||||
// on-board led
|
// camera
|
||||||
#define PIN_LED 13
|
#define PIN_CAMERA_FOCUS A3
|
||||||
|
#define PIN_CAMERA_SHUTTER A4
|
||||||
|
|
||||||
// motor configuration
|
// motor configuration
|
||||||
#define STEPPER_STEPS 200
|
#define STEPPER_STEPS 200
|
||||||
@ -84,6 +85,15 @@ result enter_jog() {
|
|||||||
return proceed;
|
return proceed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result enter_run() {
|
||||||
|
Serial.println("enter_run()");
|
||||||
|
lcd_print(0, "Running...");
|
||||||
|
lcd_print(1, "[sel] to exit");
|
||||||
|
digitalWrite(PIN_CAMERA_SHUTTER, HIGH);
|
||||||
|
state = STATE_RUN;
|
||||||
|
return proceed;
|
||||||
|
}
|
||||||
|
|
||||||
int tSettle = 100;
|
int tSettle = 100;
|
||||||
int tFocus = 500;
|
int tFocus = 500;
|
||||||
int tShutter = 500;
|
int tShutter = 500;
|
||||||
@ -120,7 +130,7 @@ MENU(scene, "Scene", doNothing, anyEvent, wrapStyle
|
|||||||
|
|
||||||
MENU(mainMenu, "PhotoStepper", doNothing, noEvent, wrapStyle
|
MENU(mainMenu, "PhotoStepper", doNothing, noEvent, wrapStyle
|
||||||
,OP("Jog", enter_jog, enterEvent)
|
,OP("Jog", enter_jog, enterEvent)
|
||||||
,OP("Run", doNothing, noEvent)
|
,OP("Run", enter_run, enterEvent)
|
||||||
,SUBMENU(scene)
|
,SUBMENU(scene)
|
||||||
,SUBMENU(configuration)
|
,SUBMENU(configuration)
|
||||||
);
|
);
|
||||||
@ -212,7 +222,15 @@ void ButtonHandler_run(const ButtonParam& param) {
|
|||||||
Serial.print("ButtonHandler_run(");
|
Serial.print("ButtonHandler_run(");
|
||||||
Serial.print(param.button);
|
Serial.print(param.button);
|
||||||
Serial.print(") - ");
|
Serial.print(") - ");
|
||||||
Serial.println("TODO");
|
switch (param.state) {
|
||||||
|
default:
|
||||||
|
Serial.println();
|
||||||
|
state = STATE_MENU;
|
||||||
|
mainMenu.dirty = true;
|
||||||
|
nav.doOutput();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
digitalWrite(PIN_CAMERA_SHUTTER, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
@ -224,6 +242,12 @@ void setup() {
|
|||||||
pinMode(PIN_LCD_BL, OUTPUT);
|
pinMode(PIN_LCD_BL, OUTPUT);
|
||||||
digitalWrite(PIN_LCD_BL, HIGH);
|
digitalWrite(PIN_LCD_BL, HIGH);
|
||||||
|
|
||||||
|
// setup camera connection
|
||||||
|
pinMode(PIN_CAMERA_FOCUS, OUTPUT);
|
||||||
|
digitalWrite(PIN_CAMERA_FOCUS, LOW);
|
||||||
|
pinMode(PIN_CAMERA_SHUTTER, OUTPUT);
|
||||||
|
digitalWrite(PIN_CAMERA_SHUTTER, LOW);
|
||||||
|
|
||||||
stepper.begin(STEPPER_RPM, STEPPER_MICROSTEPS);
|
stepper.begin(STEPPER_RPM, STEPPER_MICROSTEPS);
|
||||||
stepper.setSpeedProfile(stepper.LINEAR_SPEED, STEPPER_ACCEL, STEPPER_DECEL);
|
stepper.setSpeedProfile(stepper.LINEAR_SPEED, STEPPER_ACCEL, STEPPER_DECEL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user