control on aperture values between f 2.8 and f11
Quote from: bsaraccini on 03 / August / 2013, 08:31:36control on aperture values between f 2.8 and f11The cheapest recent Canon P&S with adjustable aperture is probably the SX150/SX160. Their lens is f/3.5 at wide angle though, and ISO sensitivity starts at 100...
--[[Exposure Meter@title eMeter@param i ISO @default i 1 @values i 80 100 125 160 200 250 320 400 500 640 800 1250 1600@param a Aperature @default a 1 @values a 2.0 2.2 2.5 2.8 3.2 3.5 4.0 4.5 5.0 5.6 5.9 6.3 7.1 8.0 9.0 10.0 11.0 13.0 14.0 16.0--]]props=require("propcase")tv_ref = { -576, -544, -512, -480, -448, -416, -384, -352, -320, -288, -256, -224, -192, -160, -128, -96, -64, -32, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992, 1021, 1053, 1080 }av_ref = {176,208,240,272,304,336,368,400,432,464,496,512,528,560,592,624,656,688,720,752}sv_ref = {378,420,440,462,486,531,576,612,645,678,709,739,772,805}-- translate user parameter into usable values & names sv96 = sv_ref[i] av96 = av_ref[a]function print_tv(val) local i = 1 local tv_str = { ">64", "64", "50", "40", "32", "25", "20", "16", "12", "10", "8.0", "6.0", "5.0", "4.0", "3.2", "2.5", "2.0", "1.6", "1.3", "1.0", "0.8", "0.6", "0.5", "0.4", "0.3", "1/4", "1/5", "1/6", "1/8", "1/10", "1/13", "1/15", "1/20", "1/25", "1/30", "1/40", "1/50", "1/60", "1/80", "1/100", "1/125", "1/160", "1/200", "1/250","1/320","1/400","1/500","1/640","1/800","1/1000","1/1250", "1/1600","1/2000","hi" } while (i <= #tv_ref) and (val > tv_ref[i]-1) do i=i+1 end return tv_str[i]endfunction print_av(val) local i = 1 local av_str = {"n/a","2.0","2.2","2.5","2.8","3.2","3.5","4.0","4.5","5.0", "5.6","5.9","6.3","7.1","8.0","9.0","10.0","11.0","13.0","14.0","16.0"} while (i <= #av_ref) and (val > av_ref[i]-1) do i=i+1 end return av_str[i]endfunction print_sv(val) local i = 1 local sv_str = {"n/a","80","100","125","160","200","250","320","400","500","640","800","1250","1600"} while (i <= #sv_ref) and (val > sv_ref[i]-1) do i=i+1 end return sv_str[i]end--[[ ========================== Main Program ================================= --]] set_console_layout(0, 0, 44, 10) print("eMeter")-- switch to shooting mode if necessary if ( get_mode() == false ) then set_record(1) while ( get_mode() == false ) do sleep(100) end end repeat repeat press("shoot_half") -- get current exposure readings repeat sleep(50) until get_shooting() == true release("shoot_half") repeat sleep(50) until get_shooting() == false bv96=get_bv96() tv96needed=sv96+bv96-av96 print("Tv:"..print_tv(tv96needed).." ISO"..print_sv(sv96).." Av:"..print_av(av96).." Bv:"..bv96) -- check for user input wait_click(1000) until not( is_key("no_key")) print("key pressed") until ( is_key("menu") )
--[[Exposure Meter@title eMeter@param i ISO @default i 1 @values i 80 100 125 160 200 250 320 400 500 640 800 1250 1600@param a Aperature @default a 1 @values a 2.0 2.2 2.5 2.8 3.2 3.5 4.0 4.5 5.0 5.6 5.9 6.3 7.1 8.0 9.0 10.0 11.0 13.0 14.0 16.0--]]require("drawings")props=require("propcase")tv_ref = { -576, -544, -512, -480, -448, -416, -384, -352, -320, -288, -256, -224, -192, -160, -128, -96, -64, -32, 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800, 832, 864, 896, 928, 960, 992, 1021, 1053, 1080 }av_ref = {176,208,240,272,304,336,368,400,432,464,496,512,528,560,592,624,656,688,720,752}sv_ref = {378,420,440,462,486,531,576,612,645,678,709,739,772,805}-- translate user parameter into usable values & names sv96 = sv_ref[i] av96 = av_ref[a]function print_tv(val) local i = 1 local tv_str = { ">64", "64", "50", "40", "32", "25", "20", "16", "12", "10", "8.0", "6.0", "5.0", "4.0", "3.2", "2.5", "2.0", "1.6", "1.3", "1.0", "0.8", "0.6", "0.5", "0.4", "0.3", "1/4", "1/5", "1/6", "1/8", "1/10", "1/13", "1/15", "1/20", "1/25", "1/30", "1/40", "1/50", "1/60", "1/80", "1/100", "1/125", "1/160", "1/200", "1/250","1/320","1/400","1/500","1/640","1/800","1/1000","1/1250", "1/1600","1/2000","hi" } while (i <= #tv_ref) and (val > tv_ref[i]-1) do i=i+1 end return tv_str[i]endfunction print_av(val) local i = 1 local av_str = {"n/a","2.0","2.2","2.5","2.8","3.2","3.5","4.0","4.5","5.0", "5.6","5.9","6.3","7.1","8.0","9.0","10.0","11.0","13.0","14.0","16.0"} while (i <= #av_ref) and (val > av_ref[i]-1) do i=i+1 end return av_str[i]endfunction print_sv(val) local i = 1 local sv_str = {"n/a","80","100","125","160","200","250","320","400","500","640","800","1250","1600"} while (i <= #sv_ref) and (val > sv_ref[i]-1) do i=i+1 end return sv_str[i]endfunction pline(line, message) -- print line function if ( line == 1 ) then fg = 271 bg=265 elseif ( line == 3 ) then fg = 258 bg=265 elseif ( line == 4 ) then fg = 271 bg=265 else fg = 265 bg=258 end draw_string( 24, (line+4)*16, string.sub(message.." ",0,34), fg, bg)end function show_msg_box(msg) pline(1,string.format(" Exposure Meter ")) pline(2,msg) pline(3,string.format(" Press any key to update")) pline(4,string.format(" Press MENU to Exit"))end --[[ ========================== Main Program ================================= --]] print("eMeter")-- switch to shooting mode if necessary if ( get_mode() == false ) then set_record(1) while ( get_mode() == false ) do sleep(100) end end repeat press("shoot_half") -- get current exposure readings repeat sleep(50) until get_shooting() == true release("shoot_half") repeat sleep(50) until get_shooting() == false bv96=get_bv96() tv96needed=sv96+bv96-av96 repeat show_msg_box(" Tv:"..print_tv(tv96needed).." ISO"..print_sv(sv96).." f"..print_av(av96).." Bv:"..bv96) wait_click(50) until not( is_key("no_key")) until ( is_key("menu") )
Started by Barney Fife « 1 2 » Creative Uses of CHDK
Started by Bob Edwards General Help and Assistance on using CHDK stable releases
Started by rgray1736 Feature Requests
Started by Daniel Moore Feature Requests
Started by jcdill General Chat