Arduino Icon

Helium Arduino Guide

This guide covers getting up and running with the Helium Prototyping Atom Module and the Arduino platform. Specifically it covers:

Required Hardware and Software

Before we get started, make sure to have all of the following in your possession:

Installing and Configuring Arduino

Once you have the required hardware components in hand, you'll need to get your Arduino development environment configured. You can do this using either the canonical Arduino IDE or via PlatformIO. Helium supports both.

Arduino IDE

First, download the Arduino IDE. Once you have this on your machine you can install the Helium package in one of two ways:

Install Helium Library via the IDE Menu

  1. From within the IDE, click Sketch, Include Library, and search for Helium.
  2. Once you find it, click the Install button.

Download the from GitHub

  1. Go to the releases section of the Helium Arduino repository on GitHub and download the latest file.
  2. Once downloaded, launch the Arduino IDE. Click Sketch then Include Library.
  3. Click Add .Zip Library and select the file.
  4. Lastly, restart the Arduino IDE and the Helium Library will now be available to you.


Installing the Helium library for PlatformIO is a simple library install away. If you do not already have a PlatformIO project use the handy Quick Start guide to set one up.

Once you have a project, go into the project folder and add the Helium library using the standard PlatformIO command line interface.

$ pio lib install Helium

Register the Atom Prototyping Module in Helium Dashboard

Helium Dashboard is our hosted device management and visualization interface. This is where you'll configure and deploy all Atoms and Element Access Points that are part of your Helium Organization. You'll need a Dashboard account to manage your hardware, sign up here.

Before we start developing on the Arduino, it needs to be added to your Helium Dashboard organization and configured.

To add it to your Helium Dashboard organization, log in to Dashboard, click + Add Atom, give it a name, the last four digits of the MAC Address, and the 4 digit HVV Identifier. Here's how simple this is:

Building your Helium Arduino Development Board

Now onto the hardware. Here are several pictures of the assembled Helium Atom Prototyping Module connected to a Arduino UNO via the Helium Arduino Adapter. This unit is also equipped with the 2.4GHz and Sub-GHz antennas that are part of your shipment.

To assemble your complete Helium Arduino Development Board:

  1. Pin the Arduino Adapter into your Arduino board
  2. Pin the Helium Atom Prototyping Module into the Adapter
  3. Connect the provided antennas to the SMA connectors on board the Helium Arduino Adapter (optional)

Depending on the specific Arduino board, you will have to configure the RX and TX jumpers on the Adapter to get the board to talk to the Helium Atom using the right pins.

Here's an example of RX and TX configuration for an Arduino Uno.

The following boards RX and TX pins are known. (Other configurations will also work but we've tested and confirmed the following.)

Board RX TX Notes
Arduino Uno 9 8
Arduino M0 Pro 0 1
Arduino Zero 0 1
Arduino Due 9 8 Wire up RX3 (15) to pin 8 on board, TX3 to pin9

Deploying the Helium Element

Before going any further, we need to power up and connect the Helium Element. The Element is what creates the local network coverage for your Helium Atom Prototyping Module. To deploy your Element, you will need to plug it into power (and Ethernet if applicable) and register the Element the Helium Dashboard.

Powering on the Element with Ethernet backhaul

To turn on the Helium Element with Ethernet connectivity, connect the supplied Ethernet cable to the back of the unit and into an internet-connected port that serves DCHP. The Element supports power over ethernet or you can connect the supplied power cable into an outlet. The Ethernet-only Element is in a white and purple case.

The orange LED light reports internet connectivity. When the LED is solid orange, you've got internet connection.

Behavior Explanation
Blue LED blinks once per second Normal operation, the Element is transmitting data to Atoms in range
Red LED blinks Normal operation. The Element is receiving data from Atoms in range
Red LED blinks rapidly for 10s to 1 min The Element is receiving a firmware update. Afterwards, the Element will reboot. No action is required on your part.
All 3 LEDs blink simultaneously once per second Fault code. The Element will reset on its own. No action is required on your part.

Powering on the Element with Cellular and Ethernet backhaul

To turn on the Helium Element with Cellular and Ethernet connectivity, connected the supplied power cable into an outlet. If you wish for redundancy in the backhaul, you can also plug it into a live Ethernet port using the supplied cable (note that the ethernet port must serve DCHP).

Your Element will be connected when the front-facing LED turns green (signaling Ethernet connectivity) or teal (for Cellular connectivity).

Note You can watch a short video about the Element and how to connect it here.

Activate the Element in Helium Dashboard

Once your Element is plugged into power and connected to either cellular or ethernet, it's time to register it in the Helium Dashboard. This process is similar to how you registered the Atom Prototyping Module. Log in to Helium Dashboard, select +Add Element, and enter the Element details.

Programming the Arduino

Now it's time to start programming the Arduino and sending data to Helium wirelessly.

To do that, let's take a look at the Basic example included with the Helium Arduino library. The example sketches can be found in the Arduino IDE under File > Examples > Helium. (You can also view it on GitHub.) Here's the Basic example in its entirety:

* Copyright 2017, Helium Systems, Inc.
* All Rights Reserved. See LICENCE.txt for license information

#include "Arduino.h"
#include "Board.h"
#include "Helium.h"
#include "HeliumUtil.h"

// NOTE: Please ensure you've created a channel with the above
// CHANNEL_NAME as it's name.
#define CHANNEL_NAME "Helium MQTT"

Helium  helium(&atom_serial);
Channel channel(&helium);


  // Begin communication with the Helium Atom
  // The baud rate differs per supported board
  // and is configured in Board.h

  // Connect the Atom to the Helium Network

  // Begin communicating with the channel. This should only need to
  // be done once. The HeliumUtil functions add simple retry logic
  // to re-create a channel if it disconnects.
  channel_create(&channel, CHANNEL_NAME);

  const char * data = "Hello Helium!";

  // Send data to channel
  channel_send(&channel, CHANNEL_NAME, data, strlen(data));

  // Wait about 5 seconds

Sketch Walkthrough

Let’s walk through what this sketch does.

The first thing you’ll see below the set of #include lines is:

Helium helium(&atom_serial);

This creates an instance of the Helium class, in this case called helium. You’ll use this to perform Atom-related functions like turning on the serial interface and connecting to the Helium network. For example, here's how we would create Channel instance called channel that we'll use to send data to the Helium MQTT service later on.

Channel channel(&helium);

Next, on line 19, we move into the setup() block. This should be familiar if you’ve worked on any Arduino sketches before. In the first few lines of this we setup the Serial port for output to the Arduino Serial Monitor tool.


Then, on line 30, we call helium.connect() to ask the Atom to connect to the Helium network.


Assuming there is an Element within range, the Atom will connect seamlessly and you’ll be online right away. You can open the Arduino Serial Monitor from within the Arduino IDE to see log output of what is happening.

Creating a Helium MQTT Channel

The end game of this sketch is to send data from your Arduino to the Helium MQTT Channel over the Helium network. Channels are the optimized routing layers Helium has built to send your device data directly to the Cloud Service(s) and endpoints of your chosing.

On line 13 of this sketch we define a new Channel name called "Helium MQTT". The name is important and is what you'll use later to send data to it. On line 35, we establish the cloud MQTT Channel and start sending data to it.

      // Begin communicating with the channel. This should only need to
      // be done once. The HeliumUtil functions add simple retry logic
      // to re-create a channel if it disconnects.
      channel_create(&channel, CHANNEL_NAME);

Assuming the call to Helium MQTT is successful, we can move on to the main loop of the sketch. If the Helium Router can’t find a channel with that name associated with your Team, this command will fail.

Sending Data to the Helium Network

With a successfully connected Helium Atom and the MQTT Channel created, we can now start sending data to the Channel. As you can see in the main loop() that starts on line 74, we create a string literal called data with the contents “Hello Helium!”. We’ll use this in a moment as the data to send to the channel. You could of course change this to say whatever you’d like.

Directly following the main loop() is where the sending of data happens. Here we attempt to send the data over the Helium network. status returns the result of the communication between the Arduino and the Helium Atom. This should be 0 for success. Anything other than 0 means some kind of failure. result is the response from the Helium network as to whether the packet was delivered successfully or not. Again, 0 means success, and anything other than 0 indicates failure. We then wait 5 seconds with delay(5000) before attempting to send again.

          const char * data = "Hello Helium!";

          // Send data to channel
          channel_send(&channel, CHANNEL_NAME, data, strlen(data));

          // Wait about 5 seconds

Making it All Happen

Now it's time to bring it all home. With the Basic example opened, the Element powered on and connected, and the configured board connected to a USB port, click the Run button in the Arduino IDE. The IDE should upload the example sketch to the board and you should see the Atom Prototyping Module power on, connect, and perform the task coded into the loaded example sketch.

To verify data is flowing over the air to the Helium infrastructure, head to either the Atom or Channel section of Dashboard to see an Event Log of the last 100 messages sent by the Atom or to the Channel. From here, you can use an MQTT client such as Mosquitto to subscribe to the Helium MQTT server and see the messages as they flow in. The MQTT server settings can be found within the Helium MQTT Channel page within Dashboard.

Questions and Next Steps

Congratulations. You're now up and running with Helium and Arduino. Naturally this is just the beginning of great things for you. If you have any questions or comments on this tutorial, or want to get in touch with Helium or the community for whatever reason, here's are some options: