arduino / arduino/ArduinoCore-sam
Arduino Due I2C "endTransmission(uint8_t sendStop)"
- Dominant language
- HTML
- Stars
- 91
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Hi Guys, I have been working on a project using the Arduino Uno as an I2C master for the VCNL4035 proximity sensor and would like to use the Arduino Due instead. My code currently works on the Uno but dose not work correctly on the Due. When selecting a register to read on the VCNL it is required that the I2C bus dose not see a stop or else the VCNL resets its register pointer to the default address. On the Uno I use Wire.endTransmission(false) to keep the bus closed before reading data from the required address. However, on the Due this function dose not appear to do the same thing. When I look at the code in Wire.cpp (ArduinoCore-sam) Line 212, the "endTransmission" function has an argument "uint8_t sendStop" however I don't see that variable being used in the function so I was just wondering if sendStop even dose anything?
Cheers
- Luke
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading Wire.cpp around line 212 and compare the Due implementation with the Uno Wire implementation, focusing on how endTransmission(uint8_t sendStop) handles false. Reproduce the VCNL4035 register-read sequence on an Arduino Due and verify that the bus remains open before the read when sendStop is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100