Пример #1
0
def test_run_part1() :    
    sketch.setup();
    while True :
        sketch.loop();
        counter = emu.pins[ledpin]
        period = counter.get_period() / 2
        if period > 0 :
            print ("period:", int(period))
Пример #2
0
def test_run_part2r() :    
    sketch.setup();
    i=0
    while True:
        sketch.loop();
        if i % 2  == 0 :
            emu.pins[rightButton].push()        
        i+=1
        counter = emu.pins[ledpin]
        period = counter.get_period() / 2
        if period > 0 :
            print ("period:", int(period))
Пример #3
0
def test_run(mode) :
    sketch.setup();
    emu.pins[speakerPin].clear_melody()
    if mode == 'part1' :
        while True: 
            sketch.loop();
            emu.pins[speakerPin].report_melody()
    else:
        turn = 0
        while True: 
            emu.pins[leftButton].push()
            sketch.loop();
            emu.pins[rightButton].push()
            sketch.loop();
            emu.pins[speakerPin].report_melody()
Пример #4
0
def test_run():
    sketch.setup()
    s.squeeze(0.75)
    while True:
        sketch.loop()
Пример #5
0
def test_run() :
    sketch.setup()
    while True:
        sketch.loop()
Пример #6
0
def test_run() :    
    sketch.setup();
    for x in range(2) :
        sketch.loop();

    emu.pins[13].report()
Пример #7
0
def test_run_abort() :
    sketch.setup()
    emu.pins[leftButton].push_delay(100)
    emu.pins[rightButton].push_delay(100)
    sketch.loop()
Пример #8
0
def test_run_sentence() :
    sketch.setup()
    while True: 
        sketch.loop()
Пример #9
0
def test_run_word() :
    sketch.setup()
    sketch.loop()
Пример #10
0
def test_run() :    
    sketch.setup();
    for x in range(2) :
        sketch.loop();