Hi,
I've played around quite a bit with using arduino code to do stuff on the camera as demonstrated -
viewtopic.php?f=2&t=46723I already had app controlling a real servo for focus and just connected the same arduino to the expansion port and it just worked - there is a trick to getting focus to be responsive because if you send say 100 then 20 to the servo it has a habit of trying to go to 100 before going back to 20, in my app(on phone) I just send data based on a timer signal. The range of servo values for the lenses vary but it' s usually somewhere in range 48 - 140 from close to far focus.
For Iris the servo values are start around 46 for widest stop then going up 3 or 4 each time to next stop increment up to what from my testing is 142 for final stop.(as different lenses have different stop increments these need to be set for each), below are arrays of stop names and values for a couple of lenses. I incremented the servo until stop changed and noted values.
Olympus 12-40
Stop names
[2.8,3.2,3.5,3.7,4,4.5,4.8,5.2,5.6,6.2,6.7,7.3,8,8.7,9.5,10,11,12,14,15,16,17,19,21,22]
Stop Servo Values
[46,49,53,57,61,65,69,74,78,81,85,89,93,98,102,106,110,113,117,122,126,130,134,138,142]
Canon 16-35 via speedbooster
Stop Names
[2.0,2.2,2.4,2.6,2.8,3.2,3.5,3.7,4.0,4.5,4.8,5.2,5.6,6.2,6.7,7.3,8,8.7,9.5,10,11,12,14,15,16]
Stop servo values
[46,49,53,57,61,65,69,74,78,81,85,89,93,98,102,106,110,113,117,122,126,130,134,138,142]
(I've only just noticed that those servo values are identical, it's just the stop the lens displays is different but ie on canon 2.8 is 61 but on olympus 2.8 is 46)
I guess you could just use a variable servo value to change value, I just wanted app to display the real stop.
For things like Iso, WB etc I use pins set to digital out and then send high then low with a short delay to pulse.
For record I use a digital out again but it is set to high for off and low for record.
Steve