Library for interfacing with Nikon DSLR through IR LED

Dependencies:   mbed

DslrIr/DslrIr.h

Committer:
danbudanov
Date:
2019-04-26
Revision:
0:e977f7ad0d48
Child:
1:bdc12143ced7

File content as of revision 0:e977f7ad0d48:

#ifndef DSLR_IR_H_
#define DSLR_IR_H_

#include "mbed.h"

class DslrIr {
public:
    DslrIr(PinName pin);
    void trigger();
 
private:
    PwmOut _pin;
    
    const static float ACTIVE_DUTY_CYCLE = 15.0/24;
    const static int PWM_PERIOD = 25;    
    const static int SEQ_ON_1_PERIOD = 2160;
    const static int SEQ_OFF_1_PERIOD = 27840;
    const static int SEQ_ON_2_PERIOD = 550;
    const static int SEQ_OFF_2_PERIOD = 1550;
    const static int SEQ_ON_3_PERIOD = 550;
    const static int SEQ_OFF_3_PERIOD = 3558;
    const static int SEQ_ON_4_PERIOD  = 550;
    const static int SEQ_OFF_4_PERIOD = 63000;
    const static int SEQ_ON_1_PERIOD2 = 2160;
    const static int SEQ_OFF_1_PERIOD2 = 27850;
    const static int SEQ_ON_2_PERIOD2 = 530;
    const static int SEQ_OFF_2_PERIOD2 = 1550;
    const static int SEQ_ON_3_PERIOD2 = 530;
    const static int SEQ_OFF_3_PERIOD2 = 3550;
    const static int SEQ_ON_4_PERIOD2  = 530;
};

#endif