Things used in this project

Hardware components:
Adafruit industries ada64 image 75px
Solderless Breadboard Half Size
×1
SparkFun Methane Gas Sensor
×1
11084 01
SparkFun Altitude/Pressure Sensor Breakout MPL3115A2
×1
Mfr 25frf52 10k sml
Resistor 10k ohm
×1
Photon new
Particle Photon
×1
11026 02
Jumper wires (generic)
×7
826 04
Male/Female Jumper Wires
×6
Adafruit industries ada260 image 90px
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:
Lasercutter
Laser cutter (generic)

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
laneofthings_9PRyn0weDL.ai

Code

Group 301 - LofT Project.gsheetArduino
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

Replications

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

Comments

Similar projects you might like

Arduino on Internal Oscillator Crystal as Clock Source
Intermediate
  • 1,064
  • 74

Protip

Want to make an Arduino having only an ATmega328 chip and nothing else? Not even the crystal oscillator!

Self Balancing Robot Using Mpu6050 Accelerometer
Intermediate
  • 240
  • 8

Protip

this is self balancing robot on two wheels using mpu6050 accelerometer based on arduino..

Reducing Arduino Power Consumption
Intermediate
  • 1,211
  • 98

Protip

One the most important feature of portable electronics should be long battery life. We can reduce the current drawn by several ways.

Node-Red and MQTT for Your IoT Projects
Intermediate
  • 143
  • 3

Work in progress

The idea is to create an environment running an MQTT Server, Mosquitto, and Node-Red, and start developing projects with connected sensors.

RING PONG
Intermediate
  • 2,172
  • 8

A simple Ping Pong game played on a NeoPixel Ring with Arduino.

An Urban Plant Watering Solution
Intermediate
  • 5,028
  • 19

Full instructions

This is an automatic system controlled by an Arduino 101 that improves plant quality in our modern, urban society.

Sign up / LoginProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlog