<|file_name|>HeadsetTester.py<|end_file_name|><｜fim▁begin｜># -*- coding: utf-8 -*-

from Headset import Headset
import logging
import time

puerto = 'COM3'
headset = Headset(logging.INFO)

try:
    headset.connect(puerto, 115200)
except Exception, e:
    raise e
<｜fim▁hole｜>headset.stopReading()
headset.closePort()
print "-----------------------------------------"
print "Is conected? " + str(headset.isConnected())
print headset.getStatus()<｜fim▁end｜>
print "Is conected? " + str(headset.isConnected())
print "-----------------------------------------"
headset.startReading(persist_data=True)
time.sleep(5)