Forum >Replies by prbonin
userhead prbonin
Replies (2)
  • You Reply:

    btw the micropython termios package doesn't have anything useful in it. If I can get rid of the serial and smbus modules the original question becomes moot.

  • You Reply:

    I think my issue is that serial and smbus references need to be replaced with micropython's UART and I2C classes. The following function:

     

    def __init__(self ,bus ,Baud):
       if bus != 0:
         self.i2cbus = smbus.SMBus(bus)
         self.__uart_i2c = I2C_MODE
       else:
         self.ser = serial.Serial("/dev/ttyAMA0" ,baudrate=Baud,stopbits=1)
         self.__uart_i2c = UART_MODE
         if self.ser.isOpen == False:
           self.ser.open()

     

    is the only place where the problem modules are called so I'm goin to replace them with regular micropython initializations. I think that I can remove all UART references since I won't be using it.