Things used in this project


Particle devices connected to the Internet
Family portrait outlines cab820d4


thingSpeakWrite WebhookJavaScript
This is a JSON formatted file for sending data to ThingSpeak from Particle using webhooks
    "event": "thingSpeakWrite_",
    "url": "",
    "requestType": "POST",
    "form": {
        "api_key": "{{k}}",
        "field1": "{{1}}",
        "field2": "{{2}}",
        "field3": "{{3}}",
        "field4": "{{4}}",
        "field5": "{{5}}",
        "field6": "{{6}}",
        "field7": "{{7}}",
        "field8": "{{8}}",
        "lat": "{{a}}",
        "long": "{{o}}",
        "elevation": "{{e}}",
        "status": "{{s}}"
    "mydevices": true,
    "noDefaults": true
MATLAB Visualization CodeR
Use this MATLAB code you visualize data from a ThingSpeak channel.
readChannelID = 93156;
fieldID1 = 1;
readAPIKey = 'MCI6XM81ZFOY8UCE';

%% Read Data %%
[data, time] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', 10, 'ReadKey', readAPIKey);

%% Visualize Data %%
thingSpeakPlot(time, data);
Particle Code for Sending Data to the ThingSpeak WebhookArduino
This code sends data to ThingSpeak from Particle devices
#define publish_delay 16000
unsigned int lastPublish = 0;

void setup() {


void loop() {
    unsigned long now = millis();

    if ((now - lastPublish) < publish_delay) {

    int value = analogRead(A0);
    Particle.publish("thingSpeakWrite_A0", "{ \"1\": \"" + String(value) + "\", \"k\": \"XXXXXXXXXXXXXXXX\" }", 60, PRIVATE);

    lastPublish = now;



IoT Engineer, Maker - I have a toaster that has been tweeting since 2008.



Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

WiFi Strength Meter
  • 729
  • 11

A meter that indicates the Wi-Fi signal strength in an intuitive way, using the parts I had on hand.

E-Paper Weather Display with Photon and IFTTT
  • 4,985
  • 25

Full instructions

Create a beautiful medium for weather information using Particle's cloud services and IFTTT.

2-Way Particle Photon Communication
  • 210
  • 4

Make two Particle Photons "talk" via the usage of webhooks!

IFTTT - Enabled Sensors with Particle Photon
  • 748
  • 11

Full instructions

Connect any sensor to Particle Photon and use it to trigger an IFTTT action with just a few lines of code.

Light Detecting Email Sender
  • 248
  • 4

Full instructions

Receive an email about when the light is too strong on your device; nobody wants a heated device left directly under the sun. Photon + IFTTT

Internet-Connected Popcorn Popper
  • 173
  • 1

Full instructions

A hot air popcorn popper triggered via the Internet! (Built for the Bellingham Codes May event.)

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog