Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
homechevron_rightExample Appschevron_rightAcceleratorschevron_rightFlow-Rate Monitor

Flow-Rate Monitor

  • Arduino Firmware
  • Environment Variables
  • Fleet Management
  • Notehub API
  • Swan
  • Web App Provided
  • Wiring Required

Monitor and measure liquid flow rate.

To run this project yourself you’ll need to:

  • Configure Notehub.
  • Purchase and assemble the necessary hardware.
  • Flash the project’s firmware.
  • Run the project’s web application.

Notehub

The Flow Rate Monitor project runs on top of Notehub. As such, to run this sample you’ll need to create a Notehub account, start a new Notehub project, and configure a handful of environment variables.

Creating a New Project

  1. Sign up for a free Notehub account, if you don’t have one already.
  2. Click the blue Create Project button in the top-right corner of the screen.
  3. Give the project a name, such as “FlowRateMonitor”, and then click the next Create Project button. Creating a project in Notehub with a name

Configuring Environment Variables

The Flow Monitor project uses environment variables for storing project settings that need to be shared and synchronized across devices.

You can set this project’s environment variables at the fleet level or device level, where fleet-level variables affect all devices in the fleet, and device-level variables are specific to an individual device.

Notehub creates an initial fleet for you when you start a new project, and you can use that for setting your initial variables.

  1. Navigate to your fleet in the navigation menu, and then click the Settings link. Location of Notehub fleet settings
  2. Click the Environment tab.
  3. Scroll down to the Fleet environment variables heading, and define the four variables below.
    1. flow_rate_alarm_threshold_max: (number) The maximum expected flow rate from your device, in mL / min. Flow-rate readings over this amount will trigger an alarm.
    2. flow_rate_alarm_threshold_min: (number) The minimum expected flow rate from your device, in mL / min. Flow-rate readings under this amount will trigger an alarm.
    3. monitor_interval: (integer) How often to take readings from the device’s flow-rate monitor, in seconds.
  4. With all three defined, click the blue Save button. Notehub fleet environment variables fully defined

With this your Notehub backend is fully configured, and you’re ready to start setting up your hardware.

Hardware

The following hardware is required to run the Flow Rate Monitor project.

  • A Blues Starter Kit .
  • A flow meter, such as this GREDIA Quick Connect Water Flow Sensor .
  • Tubing for moving liquid throughout your hardware, such as this 1/4 OD silicone tubing .
  • A power breakout, such as this HiLetgo power breakout for supplying correct voltage to this project’s various components.
  • An I2C level shifter, such as this one from HiLetgo , to translate the flow meter’s pulses from 5V logic to 3.3V logic for the Swan microcontroller.

Additionally you may wish to also use the following:

  • (Optional) An enclosure for your hardware such as this outdoor-friendly enclosure from Sixfab .

Once you have all of your hardware you’ll next need to assemble the pieces. To start, complete the Notecard and Notecarrier-F quickstart guide, which will help you connect your Notecard, Notecarrier, and Swan.

The Notecard, Notecarrier, and Swan connected

From there you’ll need to connect your flow meter to the Notecarrier. If you’re using this project’s recommended hardware, here’s a wiring diagram that shows how all the components connect .

Wiring diagram of the various flow rate monitor components

Regardless of which hardware you use, you’ll need to have the following pin wired to your Notecarrier:

  • The flow meter’s signal line must be be connected to the Notecarrier’s F_D6 pin. The Swan uses this pin to read the flow rate from the flow meter.

When everything is put together your can then place your hardware inside the optional case like the one we recommended from Sixfab, and you should be good to go.

Your next step is getting the project’s firmware running on your device.

Firmware

The Flow Rate Monitor project has custom firmware that runs on the Swan. As a next step, complete the firmware’s setup guide to get your firmware up and running.

Web Application

The Flow Rate Monitor project’s web application allows you to view flow rates, set alarm thresholds, and manage environment variables in a browser.

The Valve Monitor project’s web application

As a final step, complete the web app’s setup guide to get the app running on your development machine.

On This Page

  • Notehub
    • Creating a New Project
    • Configuring Environment Variables
  • Hardware
  • Firmware
  • Web Application

Resources

  • GitHub
  • Hackster
  • Request More Info
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up