Closed sammym1725 closed 6 years ago
I think I see the problem. The frame index is only 1 byte so after a while it got overflowed (in python). Simple fix, need to mod 256 so it wraps around.
Hi Warren J, Sorry but just to understand what you meant. Is your suggestion to add % 256 in the program line >>> temperature = etc.Tin(channel, CELSIUS, i-1) % 256 Ran this and it had another error. Still trying out new things in python and my language familiarity is still low. I appreciate if you would indicate where can I put the mod256 to avoid the ValueError. Thanks
Issue fixed. Just do a "git pull"
I tried to insert a loop so the temperature can display continuous reads but i goes well for a while and later sends an error as follows Program insert looks like this>>> try: while True:
Pause the loop first
Error msg >>> Traceback (most recent call last): File "test-E-TCxx.py", line 205, in
main()
File "test-E-TCxx.py", line 186, in main
etc.TinConfig_W()
File "/home/pi/Downloads/Linux_Drivers-master/Ethernet/python/E_TC.py", line 618, in TinConfig_W
s_buffer[MSG_INDEX_FRAME] = self.device.frameID
ValueError: byte must be in range(0, 256)
How can I get a continuous read with time stamp but avoiding the ValueError problem.