Commit 5097fa1
committed
taskI2C: use Fastwire library for I2C communication instead of Wire
In certain cases, Wire can get stuck in an infinite loop.
Example of such a case: connect the SDA bus to ground (with the other
MPUs connected as well). Wire.endTransmission() will enter an infinite
loop with no way to stop it (except resetting the Arduino).
Now, this is a very bad thing because taskI2C has the highest task
priority -- if it enters an infinite loop, all other tasks cannot run
and it will seem like the Arduino crashed.
To fix this, use the Fastwire library, which does not seem to have this
problem.1 parent 7f67c49 commit 5097fa1
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
0 commit comments