These snippets might help
this function is a wrapper for get_bv96 that reads the current scene luminosity
-- read curent bv from scene
function read_bv96()
press("shoot_half")
while get_prop(115)==0 do
sleep(100)
end
bv=get_bv96()
release("shoot_half")
return bv
end
basically, this function half-presses the shutter button, waits for the the camera to have finished metering, reads the bv96 value, and releases the button.
in your case, the "get_prop(115)" should be replaced by a different value (maybe 67).
or, if you can't find the right value, just wait long enough:
press("shoot_half")
sleep(1000)
bv=get_bv96()
release("shoot_half")
this is an example function that calls read_bv96():
function wait_for_light()
repeat
sleep(5000)
print("Waiting for start...")
t=read_bv96()
until t>0
end
the idea here is different form yours: in my application I place a cover on the camera lens and I want the script to wait until I remove the cover (reading the BV of the scene until it feels there's enough light)
you probably just need to do something along these lines:
if read_bv() > 0 then
-- do day stuff
else
-- do night stuff
end
I hope this is enough to get you started!