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

Sending Photos and Video Over the Internet!
  • 1,677
  • 24

Full instructions

Record video, perform object and face recognition, take a time-lapse or whatever else with a Particle Photon and the 5-megapixel Arducam!

MyPIR-Sensor Informs Me Via IFTTT
  • 215
  • 1

Full instructions

Cheap & easy alarm-system.

running exercise track
  • 53
  • 2

Full instructions

This is a device which can monitor running track via a GPS module and store data to a SD card. And then parse the data later from a app.

MyPIR-Sensor Activate RGB Stripe Controlled by Relay
  • 79
  • 3

Have you bought a cheap analog LED strip set in the hardware store? Bring this set with a Particle Photon and a relay to light up!

Lane of Things Group 708
  • 82
  • 2

Full instructions

Our group used a proximity sensor placed near a door to see how many people go in and out of the attendance office.

Meeting Room Minder - "Wrap it Up!"
  • 158
  • 3

Full instructions

Sometimes you need a countdown timer when your meeting is scheduled to end so that everyone knows to wrap it up and get ready to leave.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login