In this article we are connecting a Particle device to Nimbus808 solution platform using MQTT.

Particle devices are compact hardware development kits designed for building connected projects. They integrate an ARM microcontroller, a communication module (Wi-Fi, GPRS, or 3G), and access to a web-based IDE with extensive community examples and libraries.
By following this guide, you will be able to publish and subscribe data to and from Nimbus808 using any Particle device module within minutes.
Requirements
- Particle Device
- Micro USB Cable
- Particle SIM card with data plan (if using a Particle Electron)
- Nimbus808 Account
Particle Device Configuration
- If you are using a Particle Electron, complete the following steps to set up the Particle data plan. Particle Electron steps.
- If you are using a Particle Core you have two ways to set it up:
- If you are using a Particle Photon you have two ways to set it up:
Particle’s Web IDE
After claiming your Particle Device and setting up your Nimbus808 account, let’s go to Particle’s Web IDE
In the Particle Web IDE, create a new application and assign it a descriptive name.

Navigate to the Library Tab

In contributed library write MQTT and select the MQTT library.


Click on INCLUDE IN PROJECT then return to your programmable project file.
Sending Data between Nimbus808 and a Particle Device
To send and receive data between a particle device and Nimbus808 it requires the Nimbus808’s broker URL. Values will be interpreted through the MQTT library.
// This #include statement was automatically added by the Particle IDE.
#include <MQTT.h>
// Include Particle Device OS APIs
#include "Particle.h"
// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(AUTOMATIC);
// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_INFO);
MQTTClient client;
unsigned long lastMillis = 0;
void connect() {
while (!client.connected()) {
Serial.print(".");
client.connect("particleClient"); // client ID
delay(1000);
}
Serial.println("\nconnected!");
client.subscribe("/button_status");
}
void setup() {
Serial.begin(115200);
Serial.println("Hello, Particle!");
client.begin("test.mosquitto.org", 1883); // place your Nimbus808 information here
connect();
}
void loop() {
client.loop();
delay(10);
if (!client.connected()) {
connect();
}
if (millis() - lastMillis > 1000) {
lastMillis = millis();
client.publish("/hello", "world");
}
}
Have questions? Contact us for help