def read(): """read and return all data from input serial buffer""" data = "" while Serial2.available(): data += Serial2.read() return data
def nacti(): data = "" while Serial2.available(): data += Serial2.read() return data