Alyson WitteJordon Waters
Published © GPL3+

LED panel

We made an LED panel that reacts to temperature, force, and sound.

BeginnerFull instructions provided6 hours105
LED panel

Things used in this project

Hardware components

Adafruit 32x32 RGB LED Matrix Panel
Temperature Sensor
Temperature Sensor
Microphone Amplifier Breakout
Adafruit Microphone Amplifier Breakout
Flora RGB Neopixel LEDs- Pack of 4
Adafruit Flora RGB Neopixel LEDs- Pack of 4

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
Google Sheets
Google Sheets
Cloud IoT Core
Google Cloud IoT Core


Read more


IOT circuit schematic



Code defines sensor and LED pins and then activates LED based on data from sensors. Sensor data is uploaded and webhooked to log and chart data.
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_DHT_Particle.h>

#define DHTPIN A0
#define DHTTYPE DHT11
#define SNDPIN A1
#define FRCPIN A2
#define R1PIN D3
#define B1PIN D4
#define R2PIN D5
#define B2PIN D6
#define UPDATE 500ms

//Change this to the max expected value of sound input
float soundMax = 4096;
//Change this to the max expected value of force input
float forceMax = 4096;

DHT dht(DHTPIN, DHT11, 8);

void setup() {
    Particle.publish("Testing logging");

    pinMode(SNDPIN, INPUT);
    pinMode(FRCPIN, INPUT);
    pinMode(R1PIN, OUTPUT);
    pinMode(B1PIN, OUTPUT);
    pinMode(R2PIN, OUTPUT);
    pinMode(B2PIN, OUTPUT);

void loop() {
    int temp = dht.getTempCelcius();     // read temperature
    Particle.publish("Temperature", String(temp));
    int sound = analogRead(SNDPIN);
    Particle.publish("Sound", String(sound));
    int force = analogRead(FRCPIN);
    Particle.publish("Force", String(force));
    String out = String::format("{\"temperature\":%d,\"sound\":%d,\"force\":%d}",temp, sound, force);
    //Posts to a webhook linked to a google webapp script
    Particle.publish("blob", out , PRIVATE, WITH_ACK);
    float soundFactor = sound/soundMax;
    float forceFactor = force/forceMax;
    setRB(soundFactor * (temp*10), soundFactor * (255 - (temp*10)), R1PIN, B1PIN);
    setRB(forceFactor * (temp*10), forceFactor * (255 - (temp*10)), R2PIN, B2PIN);

void setRB(int red, int blue, int pinR, int pinB) {
    if(red < 0) {
        red = 0;
    if(red > 255) {
        red = 255;
    if(blue < 0) {
        blue = 0;
    if(blue > 255) {
        blue = 255;
    analogWrite(pinR, red);
    analogWrite(pinB, blue);

Google Apps Webhook Code

Grabs data uploaded by Argon
function doPost(e) {

  //Return if null
  if( e == undefined ) {
    Logger.log("no data");
    return HtmlService.createHtmlOutput("need data");

  //Parse the JSON data
  var event = JSON.parse(e.postData.contents);
  var data = JSON.parse(;

  //Get the last row without data
  var sheet = SpreadsheetApp.getActiveSheet();
  var lastRow = Math.max(sheet.getLastRow(),1);

  //Get current timestamp
  var timestamp = new Date();

  //Insert the data into the sheet
  sheet.getRange(lastRow + 1, 1).setValue(event.published_at);
  sheet.getRange(lastRow + 1, 2).setValue(data.temperature);
  sheet.getRange(lastRow + 1, 3).setValue(data.sound);
  sheet.getRange(lastRow + 1, 4).setValue(data.force);

  return HtmlService.createHtmlOutput("post request received");


Alyson Witte

Alyson Witte

1 project • 3 followers
Jordon Waters

Jordon Waters

1 project • 3 followers
Thanks to Yazeed Hawari.


Add projectSign up / Login