martinbogo / pt-battery-diagnostics

Arduino sketch, library, BOM, and Gerber files for i2/x2 Segway battery diagnostics
MIT License
22 stars 12 forks source link

Wire setClock parameter #4

Closed agkirk closed 3 years ago

agkirk commented 4 years ago

I am running a mega2560 with a MCUFRIEND display shield. The latest code hangs with Wire.setClock(400000) but runs with (100000). Don't think the shield is the problem as it is a parallel I/O board with a touch screen and SD slot (which I am not accessing). pinMode on 6 and A2 are used by the resistive touch screen. There are a couple of periods .(.) spaced 4-5 line feeds apart that have newly showed up.

martinbogo commented 3 years ago

Depends on the arduino you're using. If a lower value works for yours, then that's good! Slower can be better. I'll add a note in the code that says "if 400000 doesn't work, try 100000"