Example #1
0
def timelapse_main():
    global pic_num
    global direc

    g.timelapse_state_activate()

    while g.TIMELAPSE_STATE == True:
        g.setup_interrupt(g.switches[2], timelapse_stop)
        filename = "image%04d.jpg" % pic_num
        pic_num = pic_num + 1
        cam.snap(filename, direc)
        g.blink(g.leds[1], 0.05)
        time.sleep(2)
        g.remove_interrupt(g.switches[2])

    time.sleep(1)
    g.remove_interrupt(g.switches[2])
    g.setup_interrupt(g.switches[2], start_timelapse)
    g.boot_activate()
Example #2
0
def timelapse_main():
    global pic_num
    global direc

    g.timelapse_state_activate()


    while g.TIMELAPSE_STATE == True:
        g.setup_interrupt(g.switches[2], timelapse_stop)
        filename = "image%04d.jpg" % pic_num
        pic_num = pic_num+1
        cam.snap(filename, direc)
        g.blink(g.leds[1], 0.05)
        time.sleep(2)
        g.remove_interrupt(g.switches[2])

    time.sleep(1)
    g.remove_interrupt(g.switches[2])
    g.setup_interrupt(g.switches[2], start_timelapse)
    g.boot_activate()
def setup():
    g.setup()
    g.setup_interrupt(g.switches[2], stopanimation)
def setup():
    g.setup()
    g.setup_interrupt(g.switches[2], stopanimation)
Example #5
0
def setup():
    g.setup()
    g.setup_interrupt(g.switches[2], start_timelapse)
    g.setup_interrupt(g.switches[3], stop)
Example #6
0
def setup():
    g.setup()
    g.setup_interrupt(g.switches[2], start_timelapse)
    g.setup_interrupt(g.switches[3], stop)