I grabbed the example code from the sparkfun website under the Documents section:
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/LiPower_Shield_Example.ino
Then I modified it to work with my LCD screen and not the serial monitor, since the code provided is inherently dangerous. Please see my code attached.
clang | last year 1
What may happen if I plug the Arduino to USB to upload some sketch with connected LiPower Shield with battery attached?
tim7 | last year * 1
That would not be a healthy thing to do. The Uno’s power circuitry connects the 5V pin to USB power whenever Vin is less than 6.6V. The LiPower shield doesn’t supply Vin, so you’d end up with the output of the 5V step-up regulator on the shield shorted to the USB power on the Uno.
Member #338104 | about 6 months ago 1Doesn’t that mean the example code is inherently dangerous? (Sorry to zombie your reply.)
I run into problems with the i2cWrite16(unsigned int data, unsigned char address) function. There is something screwy in this function that causes my USB connection to port 7 (Arduino Port) to bounce, meaning I can no longer communicate with my arduino anymore until I unplug and reboot computer. It probably has to do with
// R/W =~ 0x6D/0x6C
#define MAX17043_ADDRESS 0x36
All I can say is my R/W pin on LCD screen is wired to ground. What does this code mean? I tried all values, so how do I know what will work for me? Please help!
BatteryShield_lcd.ino (8.06 KB)