Trevor KneppKamil WalasikJon Recinos
Published © GPL3+

Lane of Things

The team measured temperature, air pressure, and the methane gas content in a Lane Tech classroom.

IntermediateShowcase (no instructions)5 hours729
Lane of Things

Things used in this project

Hardware components

Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
SparkFun Methane Gas Sensor
×1
Altitude/Pressure Sensor Breakout MPL3115A2
SparkFun Altitude/Pressure Sensor Breakout MPL3115A2
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Photon
Particle Photon
×1
Jumper wires (generic)
Jumper wires (generic)
×7
Male/Female Jumper Wires
Male/Female Jumper Wires
×6
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
Only used for power. USB-A to wall cable is fine.
×1

Software apps and online services

Adobe Illustrator CS6
Particle

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)

Story

Read more

Custom parts and enclosures

Enclosure Sketch

Enclosure Design

Design of enclosure on Illustrator

Enclosure Prototype

Enclosure Prototype

Enclosure Cut Out

Enclosure separated into individual pieces

Enclosure

Sensor in Enclosure

Enclosure at location

Enclosure Wiring

Opened enclosure at work

Enclosure in room

Enclosure

Schematics

Fritzing Diagram

Pressure Sensor

Used to measure air pressure in the air

Methane Gas Sensor

Used to measure methane gas in the air

Methane Gas Sensor Dimensions

Enclosure Design File

Design of Enclosure

Code

Group 301 - LofT Project.gsheet

Arduino
function collectCurrent() {
  "use strict";
  try
  {
    //Replace the device ID below with your Photon's unique device ID
    var deviceID = "2b0042000247343138333038";
    
    //Replace the access token below with your Photon's unique access token
    var accessToken = "8a918b77f20a655be6783b96d39e3c8c92061f28";
    
    //Replace the value below with you group ID
    var groupID = "301";
    
    //Replace the room number below with location of the Photon
    var room = "256";
    
    var sheet = SpreadsheetApp.getActiveSheet();

    // Fetch the value of the testValue variable from the Spark Cloud API.
    // The name of your variable in Particle's cloud must match the variable in the URL below.
    var response = UrlFetchApp.fetch("https://api.spark.io/v1/devices/" + deviceID + "/pres?access_token=" + accessToken);

    // Parse the JSON and extract the testValue.
    var jsonResponse = JSON.parse(response.getContentText());
    var pres = jsonResponse.result;

    response = UrlFetchApp.fetch("https://api.spark.io/v1/devices/" + deviceID + "/temp?access_token=" + accessToken);
    jsonResponse = JSON.parse(response.getContentText());
    var temp = jsonResponse.result;    

    response = UrlFetchApp.fetch("https://api.spark.io/v1/devices/" + deviceID + "/meth?access_token=" + accessToken);
    jsonResponse = JSON.parse(response.getContentText());
    var meth = jsonResponse.result;
    

    // Create a timestamp.
    var timeStamp = new Date();

    // Append the timestamp and the temperature to the sheet.
    sheet.appendRow([timeStamp, groupID, room, temp, pres, meth]);
  } catch (e)
  {	
    // If something doesn't work, log it, then rethrow the error.
	Logger.log(e.name + ": " + e.message);
	throw (e);
  }
}

Credits

Trevor Knepp

Trevor Knepp

1 project • 0 followers
Kamil Walasik

Kamil Walasik

1 project • 0 followers
Jon Recinos

Jon Recinos

1 project • 0 followers
Thorns

Comments