Jim F.

Member Since: March 24, 2013

Country: United States

  • I think I found a bug in the code - line 343 in SparkFunBQ27441.cpp:

    while ((timeout--) && (!(status() & BQ27441_FLAG_CFGUPMODE)))
    

    The CFGUPMODE bit is not in the status register, but rather the flags register. This causes this bit of code to fail. The correct line of code would be:

    while ((timeout--) && (!(flags() & BQ27441_FLAG_CFGUPMODE)))
    

    This works as expected. You state in the hookup guide after mentioning the setCapacity function:

    Expect a short delay – 1-to-2 seconds – before your Arduino completes the execution of this function.

    I suspect this delay is because setCapacity calls this function and it times out on this line because it is checking the wrong register! :)

No public wish lists :(