Skip to content

Battery_Capacity_Indicator_SKU__FIT0466

Angelo edited this page Sep 22, 2016 · 5 revisions

right

Introduction

Sometimes battery information is not readily available or is hard to understand at a glance. Our Battery Capacity Indicator is a user friendly indicator interface that you can use in your projects.

Specification

  • Working voltage: 3.3V - 5.5V
  • 8 levels of brightness
  • Size: 42mm x 24mm x 8mm

Board Overview

---------------------------------------------------
right
                                                     |---------------------------------------------------------|
                                                     | |                                                     |
                                                      |-----------------------------------------------------|
                                                      | |           |          |                          |
                                                       |-----------|----------|--------------------------|
                                                       | **LABEL** | **NAME** | **FUNCTION**             |
                                                       | 1         | CLK      | CLOCK                    |
                                                       | 2         | DIO      | DATA                     |
                                                       | 3         | VCC      | Power Input +(3.3V-5.5V) |
                                                       | 4         | GND      | GND                      |  |  |  |

Tutorial

This tutorial will demonstrate how to use the Battery Capacity Indicator.

### Requirements
### Connection Diagram

center

Sample Code

Battery Capacity Indicator libraries About Library installation.

#include "TM1651.h"
#define CLK 3//pins definitions for TM1651 and can be changed to other ports
#define DIO 2
TM1651 batteryDisplay(CLK,DIO);
void setup()
{
  batteryDisplay.init();
  batteryDisplay.set(5);//0 ~ 7 mean to different brightness;
  batteryDisplay.frame(FRAME_ON);//light the frame of the battery display or FRAME_OFF to turn off the frame of the battery display
}
void loop()
{
  charging();
}

void charging()
{
  for(uint8_t level = 0; level < 6; level ++)
  {
    batteryDisplay.displayLevel(level);
    delay(500);
  }
}

FAQ

There are no questions about this product yet. If you have any problems or suggestions, you are welcome to email us or post on the DFRobot forum!

center For any questions/advice/cool ideas to share, please visit the DFRobot Forum or email techsupport@dfrobot.com

More Documents

Battery_Capacity_Indicator GITHUB Battery_Capacity_Indicator Schematic.PDF link=http://www.dfrobot.com/ get it from dfrobot store

Clone this wiki locally