Ejemplo n.º 1
0
 def initRxMode(self, callback=None):
     self._write(b'AT+TEST=RXLRPKT\r\n')
     self._waitTimeout(200)
     self.uart.read()
     self._timer = timEx.addTimer(20, timEx.PERIODIC, self._monitor)
     if callback:
         self.callback = callback
Ejemplo n.º 2
0
 def __init__(self, addr=0x08):
     self.i2c = i2c_bus.get(i2c_bus.M_BUS)
     self.addr = addr
     self._available()
     self.press_status = 0x00
     self.release_status = 0x00
     self._timer = timEx.addTimer(100, timEx.PERIODIC, self._monitor)
     self.status_hold = 0xff
Ejemplo n.º 3
0
    def __init__(self, port):
        self.uart_data = ''
        self.gps_time = '00:00:00'
        self.gps_pos_state = ''
        self.latitude = ''
        self.longitude = ''
        self.satellite_num = ''

        self.uart = machine.UART(1, tx=port[0], rx=port[1])
        self.uart.init(9600, bits=0, parity=None, stop=1)
        self._timer = timEx.addTimer(100, timEx.PERIODIC, self._monitor)
Ejemplo n.º 4
0
    def __init__(self):

        self.uart = machine.UART(1, tx=17, rx=16)
        self.uart.init(19600, bits=0, parity=None, stop=1)
        self._timer = timEx.addTimer(100, timEx.PERIODIC, self._monitor)
        self._times = 0
        self.cb = None
        self.unknownCb = None
        self.access_add = 0
        self.user_id_add = 0

        self.state = ''
        time.sleep_ms(100)
        self.readUser()
Ejemplo n.º 5
0
 def __init__(self):
     self.uart = machine.UART(1, tx=17, rx=16)
     self.uart.init(9600, bits=8, parity=None, stop=1)
     self._timer = timEx.addTimer(200, timEx.PERIODIC, self._monitor)
     self.data_save = b''