Things used in this project

Schematics

Fresh Air Schematics

Code

Fresh Air v1 (Arduino Code)Arduino
/*  Project - freshair
    Team - Edison
    Hackster AWS Intel hackathon, NYC
    December 11, 2016
*/

/*  Connections:
    TH02 sensor - I2C
    Light sensor - A0
*/

#include <TH02_dev.h>
#include "Arduino.h"
#include "Wire.h"

#define  LightSensor A0

void setup() {
  Serial.begin(9600);        // start serial for output

  Serial.println("TH02 sensor initializing ...");
  /* Power up,delay 150ms,until voltage is stable */
  delay(150);
  /* Reset TH02 */
  TH02.begin();
  delay(100);
  /* Determine TH02_dev is available or not */
  Serial.println("TH02 is available");

}

void loop()
{
  float temper = TH02.ReadTemperature();
  Serial.print("Temperature: ");
  Serial.print(temper);
  Serial.print("C");
  Serial.println("\t");

  float humidity = TH02.ReadHumidity();
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("%");
  Serial.println("\t");

  // read the input on analog pin 0:
  int sensorValue = analogRead(LightSensor);
  // print out the value you read:
  Serial.print("Light: ");
  Serial.print(sensorValue);
  Serial.println("\t");
  Serial.println();
  // delay in between reads for stability
  delay(1000);        // delay in between reads for stability

}
Fresh Air CodeArduino
/*  Project - freshair
    Team - Edison
    Hackster AWS Intel hackathon, NYC
    December 11, 2016
*/

/*  Connections:
    TH02 sensor - I2C
    Light sensor - A0
    CO Sensor - A1
    CO2 Sensor - A2
*/

#include <TH02_dev.h>
#include "Arduino.h"
#include "Wire.h"

#define  LightSensor A0
#define  COSensor A1
#define  CO2Sensor A2

void setup() {
  Serial.begin(9600);        // start serial for output

  Serial.println("TH02 sensor initializing ...");
  /* Power up,delay 150ms,until voltage is stable */
  delay(150);
  /* Reset TH02 */
  TH02.begin();
  delay(100);
  /* Determine TH02_dev is available or not */
  Serial.println("TH02 is available");

}

void loop()
{
  float temper = TH02.ReadTemperature();
  Serial.print("Temperature: ");
  Serial.print(temper);
  Serial.print("C");
  Serial.println("\t");

  float humidity = TH02.ReadHumidity();
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("%");
  Serial.println("\t");

  // read the input on analog pin 0:
  int sensorValue0 = analogRead(LightSensor);
  // print out the value you read:
  Serial.print("Light Level: ");
  Serial.print(sensorValue0);
  Serial.println("\t");
  Serial.println();

  // read the input on analog pin 1:
  int sensorValue1 = analogRead(COSensor);
  // print out the value you read:
  Serial.print("CO Level: ");
  Serial.print(sensorValue1);
  Serial.print("\t");

  // read the input on analog pin 2:
  int sensorValue2 = analogRead(CO2Sensor);
  // print out the value you read:
  Serial.print("CO2 Level: ");
  Serial.print(sensorValue2);
  Serial.println("\t");

  // delay in between reads for stability
  delay(1000);        // delay in between reads for stability

}

Credits

Lizxiyiurrt5pavio2mi
Farrukh Zia

Professor of computer technology at CityTech

Contact
Hxwczrzbvb3l5giwvihe
Farjana Ferdousy

Masters Degree in Computer Science student from Queens College

Contact

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

Arduinomated Car Parking with Voice Assistance in Smartphone
Intermediate
  • 93
  • 5

Full instructions

Make an assistant which tells you about how much to drive backwards without any collision through your smartphone by Arduino and 1Sheeld.

Reducing Arduino Power Consumption
Intermediate
  • 77
  • 4

Full instructions

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

Sigfox Forest Fire Detector
Intermediate
  • 2,242
  • 14

Full instructions

How to prevent forest from burning? A small Sigfox signal can prevent natural disasters. We will use an Arduino MKRFOX + a flame detector.

From BT to WiFi: Creating WiFi Controlled Arduino Robot Car
Intermediate
  • 316
  • 5

Protip

NodeMCU ESP8266 in access point mode: the simplest way to make Wi-Fi controlled Robot Car from Bluetooth Arduino Robot Car + Android App.

Arduino Word Clock
Intermediate
  • 509
  • 8

Full instructions

A clock that let you read the time, for real!

Wall Mounted Textile MP3 Player
Intermediate
  • 69
  • 2

MP3 Player with fabric user interface using Arduino LilyPad.

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog