Canon EF User Manual Page 29

  • Download
  • Add to my manuals
  • Print
  • Page
    / 34
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 28
Arduino Code
const int HotShoe_Pin = 8;
const int HotShoe_Gnd = 9;
const int LogicVDD_Pin = 10;
const int Cam2Lens_Pin = 11;
const int Clock_Pin = 13;
void setup() // initialization
{
pinMode(HotShoe_Pin, INPUT);
digitalWrite(HotShoe_Pin, HIGH);
pinMode(HotShoe_Gnd, OUTPUT);
digitalWrite(HotShoe_Gnd, LOW);
pinMode(LogicVDD_Pin, OUTPUT);
digitalWrite(LogicVDD_Pin, HIGH);
pinMode(Cam2Lens_Pin, OUTPUT);
pinMode(Clock_Pin, OUTPUT);
digitalWrite(Clock_Pin, HIGH);
delay(100);
send_signal(0x??);
delay(100);
send_signal(0x??);
}
void loop()
{
if(digitalRead(HotShoe_Pin) == LOW) // upon shutter release
{
send_signal(0x??); // move focus to infinity
delay(1000);
send_signal(0x??); // move focus back to nearest
delay(1000);
}
}
void send_signal(byte signal) // SPI command generator
{
unsigned int i;
for(i = 0; i < 16; i++)
{
digitalWrite(Clock_Pin, i & 1);
if(i % 2 == 0)
{
digitalWrite(Cam2Lens_Pin, (signal >> (i / 2)) & 1);
}
}
}
We are asked not to disclose the commands in public.
Please contact me to get the values shown as ??.
Page view 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34

Comments to this Manuals

No comments