from ctypes import *
from secg40 import *
import sys
import time

device = SECG40(get_lib_path())

if device.connect(-1, 5000) == False:
    print('Error: device is not connected')
    sys.exit()

print('device is connected... ({})'.format(device.get_serial_number()))

device.reset()

device.set_output_function(OutputFunction_E.Output_Sine.value)

device.set_baseline_reset_test(BaselineTest_E.Baseline_80Hz.value)
time.sleep(10)

device.set_baseline_reset_test(BaselineTest_E.Baseline_Off.value)
time.sleep(10)

device.close()
