Exemplo n.º 1
0
    base_led.on(color='g')
    time.sleep(0.1)

    base_led.off(color='g')
    time.sleep(0.1)

# Green on - off
start_time = time.time()
while True:
    if time.time() - start_time > 3:
        break

    base_led.on(color='b')
    time.sleep(0.1)

    base_led.off(color='b')
    time.sleep(0.1)

# Toggle
start_time = time.time()
while True:
    if time.time() - start_time > 3:
        break

    base_led.toggle(color='all')
    time.sleep(0.1)

time.sleep(3)

module.disconnect()
Exemplo n.º 2
0
import sys, time
sys.path.insert(0, '../dynamikontrol')

from dynamikontrol import Module

m = Module(debug=True)

# Print module serial number
print('Serial number: %s' % (m.get_serial_no(), ))

print('ID: %s' % (m.get_id(), ))

print('Device time: %s' % (m.get_time(), ))

print('FW version: %s' % (m.get_fw_version(), ))

m.disconnect()