Arduino
Arduino copied to clipboard
I2C as Master, sending data. [3.1.2]
Basic Infos
This is an I2C issue.
- [?] This issue complies with the issue POLICY doc.
- [x] I have read the documentation at readthedocs and the issue is not addressed there.
- [x] I have tested that the issue is present in current master branch (aka latest git).
- [x] I have searched the issue tracker for a similar issue.
- [ ] If there is a stack dump, I have decoded it.
- [x] I have filled out all fields below.
Platform
- Hardware: [ESP8266]
- Core Version: [Latest does not work with this issue. The issue is I have to use old 2.0.10]
- Development Env: [Arduino IDE]
- Operating System: [Windows]
Settings in IDE
- Module: [Nodemcu 1.0]
- Flash Mode: [qio|dio|other]
- Flash Size: [4MB(2M SPIFFS)]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [nodemcu]
- Flash Frequency: [N/A]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [115200]
Problem Description
I have used a Data logger on the SDA and SCL
- (Write mode) the issue is between the Address Byte and the First Data Byte. There is a bit set high. 00000000 > 10000000. It could be because SDA is flipped at the wrong time during ACK.
- Also at the end of transmission the SCL has an extra pulse that holds onto the bus. I think it is the same reason as above.
- (Read mode) I think if you fix the write mode, this will be fixed also.

My fix:
- Use version 2.5.0
- With version 2.5.0 it all works perfect.
- I do not know where the fault got introduced between 2.5.0 and now, I cant me arsed to find out. I have a working fix for my purposes.
- Note I had a similar issue when I wanted to use interrupts in a project, I had to do the same, use ver. 2.5.0
MCVE Sketch
#include <Arduino.h>
#include <Wire.h>
char Buffer_TX[64]; /* message */
void SendBufferOnI2C(int I2C_address) {
Wire.beginTransmission(I2C_address); // Get device at I2C_address attention
Wire.write(Buffer_TX, 64); // Send Buffer_TX
Wire.endTransmission(); // Stop transmitting
}
Debug Messages
See images.
The issue cannot be found with code.
Could this be related to this PR: https://github.com/esp8266/Arduino/pull/6654 ?
Or maybe your issue is somewhat related to this issue? https://github.com/esp8266/Arduino/issues/6255
Could be if they did the changes between 2.5.0 and now. The screenshots of the data look to be in the same area. Its above my skills to give more info than what I have shown.