Skip to content

BatteryCapacityIndicator_SKU_FIT0466

Angelo edited this page Sep 22, 2016 · 5 revisions

right

Introduction

When you don't want to let your real-time battery capacity is just the number on the LCD screen,but The iconic image of battery.Then you may need our Battery Capacity Indicator.It can be very good to help you show real time power capacity, and that people can clearly understand the current battery power capacity from a distance.

Specification

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

Board Overview

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

Tutorial

This tutorial will describe you 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);
  }
}
### RESUALT

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 [StoreLink DFRobot Store]

Clone this wiki locally