Battery_Capacity_Indicator_SKU__FIT0466-DFRobot

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

Board Overview

FIT0466-LINE.png
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

FIT0466-CONNET.png

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!

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