Wikia

CHDK Wiki

UBASIC/Scripts: LED light

Talk0
565pages on
this wiki

< UBASIC

Revision as of 01:50, June 21, 2012 by Waterwingz (Talk | contribs)

Written for/on: A590 IS - should work on all other cameras.

Introduction

This LED light script for use your Canon instead of common flashlight. Script can do flashes with interval.

Script Code


rem Author - wosk
rem LED light for A590
rem LED number for other may be else

@title LED light
@param a Led(G4,Y5,O7,B8,FR9)
@default a 9
@param b Flasher(no 0)
@default b 0
@param c FlashInterval(.05 Sec)
@default c 10

if b=1 and c<0 then c=0
z=c*50+1

print "Press button For Stop" 

if b=0 then
  set_led a 1 30
  wait_click
else
  print "Flash interval ",z," msec"
  do
    set_led a 1 30
    wait_click z
    if 1<>is_key "no_key" then goto "theend"
    set_led a 0 0
    wait_click z
    if 1<>is_key "no_key" then goto "theend"
  until 0
endif

:theend
set_led a 0 0
end

--W0sk

Advertisement | Your ad here

Around Wikia's network

Random Wiki