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 hours192
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 sketch u8ikgyle4p

Enclosure Design

Design of enclosure on Illustrator
Screen shot 2017 03 27 at 10 00 07 am qx9rolh5q4

Enclosure Prototype

20170315 103434 ktj7suopdd

Enclosure Prototype

20170315 103449 (1) jumcdo2nzj

Enclosure Cut Out

Enclosure separated into individual pieces
Enclosurecutout ltupafimuj

Enclosure

Enclosure1 hsonxso63i

Sensor in Enclosure

Deviceinenclosure w6hd3ttd9s

Enclosure at location

Enclosurelocation cy0fpe1jam

Enclosure Wiring

Enclosurewiring p7ftzl4iap

Opened enclosure at work

Enclosureopenedworking 2mzwtnvfyh

Enclosure in room

Enclosureroom zuf4qs4oxi

Enclosure

Enclosurefaraway qwj9xtlj1z

Schematics

Fritzing Diagram

Screen shot 2017 04 18 at 10 22 03 am 6lfqaosb5d

Pressure Sensor

Used to measure air pressure in the air
Screen shot 2017 03 22 at 9 50 34 am ypc3mp6qnr

Methane Gas Sensor

Used to measure methane gas in the air
Screen shot 2017 03 22 at 9 52 01 am qrb1ren8u0

Methane Gas Sensor Dimensions

Screen shot 2017 03 22 at 9 52 18 am nuty0cmidv

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
Contact
Kamil Walasik

Kamil Walasik

1 project • 0 followers
Contact
Jon Recinos

Jon Recinos

1 project • 0 followers
Thorns
Contact

Comments