Browse our open source example apps to accelerate your wireless IoT project.

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_rightBlogchevron_rightEasiest Way to Add Cellular to an ESP32 IoT Project

Easiest Way to Add Cellular to an ESP32 IoT Project

Easiest Way to Add Cellular to an ESP32 IoT Project banner

May 31, 2023

Learn how to add affordable prepaid cellular to an ESP32-based IoT solution

  • Cellular
  • ESP32
Rob Lauer
Rob LauerSenior Director of Developer Relations
email

I've come to appreciate the ESP32 line of microcontrollers from Espressif Systems , mostly due to a combination of low-cost, low-power, yet solid MCU performance. In particular, the ESP32-based HUZZAH32 Feather from Adafruit is a board you'll routinely see in some tutorials we post on Hackster .

adafruit huzzah 32 feather

While Wi-Fi and Bluetooth are integrated into some ESP32 MCUs, adding cellular to the mix broadens the deployment options of any IoT project. Having a combination of connectivity options also enables you to use Wi-Fi when available, but fall back on cellular should Wi-Fi be unavailable or the physical location require it.

Developer-Friendly Cellular with the Notecard

The key to success with cellular IoT connectivity on the ESP32 is a secure and reliable System-on-Module, the Blues Notecard .

blues cellular notecard

The Notecard is a 30mm x 35mm device-to-cloud data pump. With the included cellular and GPS capabilities (and a Wi-Fi option ), the Notecard is an easy choice for securely syncing data with the cloud over a variety of global cellular protocols (specifically Cat-1, LTE-M, and NB-IoT).

And the cost? The Notecard comes prepaid with 10 years of global service and 500MB of data, starting at just $49.

But...what about the M.2 edge connector on the Notecard? How does that connect to an ESP32 microcontroller?

Probably not like this:

notecard and esp32 huzzah feather

Easy Integration Options

Let me introduce you to the Blues Wireless Notecarriers . These are development boards that make it dead simple to connect virtually any MCU or SBC to a Notecard. You place the Notecard into the provided M.2 slot and the Notecarrier exposes all of the pins on the Notecard to the MCU.

notecard and notecarrier a

Now it gets even easier if you're using a Feather-based ESP32 (like I often do). The Notecarrier F (part of the Blues Starter Kit ) has a Feather-compatible socket so you can insert your MCU directly onto the board, for wire-free connectivity.

notecarrier-f

The Notecarrier F JST connectors for solar and/or LiPo batteries, and two Qwiic I2C ports for attaching external peripherals.

Notecard + Notecarrier F + ESP32 = ❀️

From Device To Cloud, Securely

A key component of the Notecard's security architecture is that it doesn't live on the public Internet. The Notecard doesn't have a publicly-accessible IP address. You must use a proxy, accessed via private VPN tunnels, to communicate between the Notecard and your cloud application.

This is where the Blues cloud service Notehub comes into play.

Notehub is a thin cloud service that securely (over TLS) receives, processes, and routes data to your cloud endpoint of choice. This could be a big cloud like AWS, Azure, or Google Cloud - or any IoT-optimized platform like Losant, Datacake, or Ubidots. Your own self-hosted custom RESTful API is fine as well!

blues notehub and notecard data flow

As an added bonus, Notehub provides OTA firmware update capabilities along with full device fleet management and cloud-based environment variables for easily sharing data across fleets of Notecards.

When to Use Notecard, and When Not

It's important to note that the cellular Notecard is a low-power, low-bandwidth, and high-latency device. Its design center is focused on sending small packets of data (e.g. accumulated sensor readings, generated ML inferences, and the like) on an occasional cadence to the cloud.

πŸ‘ Scenarios when the Notecard makes sense:

  1. Any low-bandwidth transfer of data over Cat-1, LTE-M, or NB-IoT cellular
  2. Low-power edge computing deployments (agriculture, smart meters, environmental monitoring, and so on)
  3. High-latency remote control solutions
  4. When secure and encrypted communications are critical
  5. When turnkey cloud integrations are desired

πŸ‘Ž Scenarios when the Notecard doesn't quite work:

  1. As an "always connected" drop-in replacement for Wi-Fi
  2. When you need sub-millisecond latency
  3. Streaming HD video or high res images

Ready to See How it All Works?

With a Blues Starter Kit you can follow the remainder of this blog post for a quick and easy getting started experience.

Be sure to browse our full developer site for Notecard datasheets and additional technical information.

After creating a free account at Notehub.io and initializing your first project, copy the provided unique ProductUID from the project and save it for the next step.

getting your productuid from notehub

Programming ESP32 Firmware

The ESP32 supports commonly used languages like Arduino/C and MicroPython. While I'm an avid Python lover, most ESP32 developers are likely writing Arduino or C/C++, so we'll stick with that path for now.

The API that powers the Notecard is completely JSON-based. So technically speaking, it doesn't matter what programming language you use. We provide SDKs for Arduino, Go, C/C++, and Python and our community has built SDKs for .NET and Rust .

Whichever route you take, open up your preferred IDE and paste in this basic sketch:

// Include the Arduino library for the Notecard
#include <Notecard.h>
#define productUID "com.your-company.your-name:your_project"

Notecard notecard;

void setup() {
  delay(2500);
  Serial.begin(115200);
  notecard.begin();

  J *req = notecard.newRequest("hub.set");
  JAddStringToObject(req, "product", productUID);
  JAddStringToObject(req, "mode", "continuous");
  notecard.sendRequest(req);
}

void loop() {
  J *req = notecard.newRequest("note.add");
  if (req != NULL) {
    JAddStringToObject(req, "file", "sensors.qo");
    JAddBoolToObject(req, "sync", true);

    J *body = JCreateObject();
    if (body != NULL) {
      JAddNumberToObject(body, "temp", 25.6);
      JAddNumberToObject(body, "humidity", 48.2);
      JAddItemToObject(req, "body", body);
    }

    notecard.sendRequest(req);
  }

  delay(15000);
}

What exactly is happening in this sketch?

  • We are using a hub.set request to associate the Notecard with the Notehub project.
  • We are sending a JSON object (a Note) with mock temperature and humidity data to the cloud, over cellular.
  • Wait 15 seconds and do it all again!

You can build and upload this sketch to your ESP32 now, then check your Notehub project to see it in the cloud.

Cellular Data in the Cloud

Once that note.add request is initiated, your Note is queued on the Notecard for syncing with the cloud. Since we are keeping this example simple, we are also using the sync:true option in the note.add request to immediately initiate a cellular connection and send the data to Notehub ASAP.

Go ahead and head back to Notehub.io and take a look at the recently uploaded events in the Event panel for your project:

mock sensor data in notehub

But we don't want your data to live on Notehub! The most important part of the story is securely routing your data to any cloud endpoint. Take a look at our extensive Routing Tutorials and pick your favorite cloud, such as Ubidots , and create an engaging cloud dashboard to interpret your data:

example ubidots dashboard

TIP: Communication with the Notecard is bi-directional in nature. This means the Notecard can also receive data from the cloud. See Inbound Requests & Shared Data Guide for more details.

Next Steps

We've barely even started our journey with cellular IoT and the ESP32! Hopefully you've seen that with minimal hardware and minimal firmware, you can easily add cellular connectivity to a new or existing IoT project.

Looking for some good next steps?

  • If you haven't already, pick up your own Blues Starter Kit .
  • Next, the real Notecard Quickstart does a MUCH better job getting you started.
  • Consult the Notecard API reference to get a full grasp of the capabilities of the Notecard.
  • Check out all the awesome Blues projects on Hackster for inspiration.

Happy hacking on the ESP32! πŸ‘©β€πŸ’»

In This Article

  • Developer-Friendly Cellular with the Notecard
  • Easy Integration Options
  • From Device To Cloud, Securely
  • When to Use Notecard, and When Not
  • Ready to See How it All Works?
  • Programming ESP32 Firmware
  • Cellular Data in the Cloud
  • Next Steps

Blues Developer News

The latest IoT news for developers, delivered right to your inbox.

Comments

Join the conversation for this article on our Community Forum

Blues Developer Newsletter

The latest IoT news for developers, delivered right to your inbox.

Β© 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