I have a simple logging function in Portal and another simple eeprom reader in a radio. I want to write the entire eeprom to file. I can do this for one rpc but when looped to read the entire eeprom, the radio times out. I had a conversation with Greg and John about using callback() or a hook. There can be no data loss and this func. need only be called once every so often. Thank you for your time.
Code:
def readPage(add): i2cWrite("\xA0" + add, 1, False) page = i2cRead("\xA1", 64, 1, False) pageStr = "" dataItr = 0 while (dataItr < 64): pageStr += ord(page[dataItr])<<8 + ord(page[dataItr + 1]) + '\n' dataItr += 2 print page rpc("\x00\x00\x01", "logToCSV", 'testLog.txt', pageStr)
Comment