Tuesday, November 6, 2018

Wirelessly Control your camera and Magic Lantern states

I thought I would share an experiment I’ve just successfully completed, whereby I can now wirelessly control Magic Lantern states, for example setting combinations of Dual ISO, Advanced Bracketing and Auto ETTR, as well as taking images: all without touching the camera.

To achieve this I’m making use of the Foolography Unleashed dongle for my 5D3: https://www.foolography.com/products/unleashed/




The dongle is permanently plugged into the side my 5D3 and requires no batteries. The dongle’s functionality allows me to control various, but not exhaustive, camera functions, via an app (I have mine running on my iPhone, iPad and iPod).

The App’s screen looks like this (this is an actual screen capture fro my iPad):



As a proof of principle, I decided to make use of the metering mode and the white balance. The WB has 9 different settings, so in theory I could set 9 different ML states. For now I’ve coded four, namely:

  • State 1 (WB AWB): Dual ISO OFF, Auto ETTR OFF, (Auto) Advanced Bracketing OFF
  • State 2 (WB Sunshine): Dual ISO ON
  • State 3 (WB Shady): Get/set ETTR exposure
  • State 4 (WB cloudy): Take an (auto) Advanced Bracket set
Once you have selected a state, by choosing the WB value that corresponds to that state, you then use the app to simply toggle between the two (metering mode) extremes, swiping down, top to bottom. The Lua script then does the rest.

For now I simply switch between the various states to achieve what I want. For instance, I might use the app like this:

  1. Set state 1 (WB AWB) to ensure everything off
  2. Go to Sunshine WB and set my Dual ISO (100/800)
  3. Go to Shady WB and set my exposure via ETTR
  4. Press the shutter, via the app, and review the (low quality) image in the app
Alternatively, I could:
  1. Set state 1 (WB AWB) to ensure everything off
  2. Go to Cloudy WB and set Advanced Bracketing
  3. Press the shutter, via the app, and let ML get the brackets, and review the (low quality) image in the app
Obviously, this is a simple demo or proof of principle. If I progress the idea I will tidy things up.

Also, there are some limitations: the biggest being you need a look up table (written down or remember) to convert WBs into ML states. Nevertheless, once again, ML and Lua shows what can be done.

For those interested, here is the (crude) script.

wb_value = -1
change = false
previous_meter_value = 0

function property.WB_MODE_LV:handler(value)
wb_value = value
end

function property.METERING_MODE:handler(value)
if (previous_meter_value == 3 and value == 5) then -- if previous metering value was 3 and the current one is 5
change = true
previous_meter_value = 0 -- clear variable
else
change = false
previous_meter_value = value -- remember current metering value
end
end

function watch(arg)
if change == true then
change = false
if wb_value == 0 then -- set all states to off
menu.set("Expo","Dual ISO",0)
menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",0)
elseif wb_value == 1 then -- switch Dual ISO on
menu.set("Expo","Dual ISO",1)
elseif wb_value == 8 then -- set ETTR exposure (make sure you set ETTR for your needs)
menu.set("Expo","Dual ISO",0)
menu.set("Expo","Auto ETTR",1)
menu.set("Shoot","Advanced Bracket",0)
key.press(KEY.SET) -- ETTR must be configured for SET trigger
elseif wb_value == 2 then -- Do Auto bracketing
menu.set("Expo","Dual ISO",0)
menu.set("Expo","Auto ETTR",0)
menu.set("Shoot","Advanced Bracket",1)
end
wb_value = -1 -- clear variable
end
return true
end

event.shoot_task = watch

No comments:

Post a Comment