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

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