Skip to content

cdjq/DFRobot_FRN20

Repository files navigation

DFRobot_FRN20

Overview

The FRN20 is a high-precision flow sensor designed for accurate measurement of gas or liquid flow rates. It features an I2C communication interface, factory calibration, and temperature compensation to provide stable, repeatable measurements across varying environmental conditions.

Product Link: https://www.dfrobot.com/

SKU: SEN0630

Table of Contents

Summary

This Arduino/C++ library provides drivers for the FRN20 flow sensor. It supports I2C communication to read raw and calibrated flow values, and to load sensor parameters (range, offset, conversion coefficients) from the device.

Installation

  1. Download or copy the library into your Arduino libraries directory.
  2. Include the library in your sketch:
#include <DFRobot_FRN20.h>

Methods (Arduino C++ API)

/**
 * @fn DFRobot_FRN20
 * @brief Constructor, pass in I2C bus object
 * @param pWire I2C bus object (default: &Wire)
 */
DFRobot_FRN20(TwoWire *pWire = &Wire);

/**
 * @fn begin
 * @brief Initialize I2C and check device presence
 * @return byte Result of `Wire.endTransmission()` (0 = success)
 */
byte begin(void);

/**
 * @fn readMassFlowData
 * @brief Read and convert mass flow using loaded parameters
 * @return uint8_t 1 = success, 0 = failure
 */
uint8_t readMassFlowData(void);

Compatibility

Platform Work Well Work Wrong Untested Remarks
Arduino UNO
Arduino MEGA2560
Arduino Leonardo
FireBeeetle-M0
FireBeeetle-ESP32-E
ESP8266
Micro:bit

History

  • 2026/01/26 - Version 1.0.0 released.

Credits

Written by PLELES ([email protected]), 2026-01-26 DFRobot Website

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published