Esempio n. 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))
Esempio n. 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))
Esempio n. 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()
Esempio n. 4
0
def test_run():
    sketch.setup()
    s.squeeze(0.75)
    while True:
        sketch.loop()
Esempio n. 5
0
def test_run() :
    sketch.setup()
    while True:
        sketch.loop()
Esempio n. 6
0
def test_run() :    
    sketch.setup();
    for x in range(2) :
        sketch.loop();

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