Closed ming-chu closed 2 years ago
You should set the TX buffer once in setup()
using setTxBuffer()
, then you use write()
to put the data into the buffer. Please see the ReadDS1307 example for the correct usage.
Thanks for the advice. Sorry for any inconvenience caused 🙇♂️
Problem:
The data line wasn't sending any data after the address was sent. If I got any mistaken for the usage, please guide me.
Thanks for the library and appreciated.😊
Before fix:
The data line keeps sending the address + write mode with no data afterward. [0x64:W, nothings ... ]
After fix:
The data line has data following the first clock, excepted [0x64:W, 00000001, 00000010, 00000011] in this case.
Simple code to reproduce the problem:
_txBufferIndex >= _txBufferSize
is always true and return for the first write, so_txBuffer
seems never write.Screenshots from oscilloscope
before fix:![image](https://user-images.githubusercontent.com/12498885/137703109-3b23a530-e093-4085-9216-72c1f54dfe91.png)
after fix:![image](https://user-images.githubusercontent.com/12498885/137703212-5aa8d726-86ff-49e4-b975-3f7cea6d417d.png)