author

matthew-campbell

1
Inbox View Profile
15Comments

Tell us about yourself!

Achievements

  • Still having problems even after I installed the stuff from your GitHub

    View Instructable »
  • fixed my problem

    /* Code for Environmental Sensor that takes air quality, light, temperature, and noise data from the environment to display on a lcd screen*/#include <Wire.h>#include "MutichannelGasSensor.h"#include "rgb_lcd.h"rgb_lcd lcd;const int buttonPin = 8;int buttonPushCounter = 0;int buttonState = 0;int lastButtonState = 0;void setup(){ lcd.begin(16, 2); // set up the LCD's number of columns and rows Serial.begin(9600); // start serial for output lcd.setRGB(225, 0, 0); lcd.print("Calibrating"); lcd.noAutoscroll(); gas.begin(0x04);//the default I2C address of the slave is 0x04 //gas.changeI2cAddr(0x04); //Calibrate Gas Sensor gas.doCalibrate(); pinMode(buttonPin, INPUT);}void loop(){ float c; float d; float e; …

    see more »

    /* Code for Environmental Sensor that takes air quality, light, temperature, and noise data from the environment to display on a lcd screen*/#include <Wire.h>#include "MutichannelGasSensor.h"#include "rgb_lcd.h"rgb_lcd lcd;const int buttonPin = 8;int buttonPushCounter = 0;int buttonState = 0;int lastButtonState = 0;void setup(){ lcd.begin(16, 2); // set up the LCD's number of columns and rows Serial.begin(9600); // start serial for output lcd.setRGB(225, 0, 0); lcd.print("Calibrating"); lcd.noAutoscroll(); gas.begin(0x04);//the default I2C address of the slave is 0x04 //gas.changeI2cAddr(0x04); //Calibrate Gas Sensor gas.doCalibrate(); pinMode(buttonPin, INPUT);}void loop(){ float c; float d; float e; int f; float g; int h; float r; float t; float fah; gas.powerOn(); buttonState = digitalRead(buttonPin); // compare the buttonState to its previous state if (buttonState != lastButtonState) { if (buttonState == HIGH) { buttonPushCounter++; } // Delay a little bit to avoid bouncing delay(50); } if (buttonPushCounter==0){ c = gas.measure_NH3(); lcd.setRGB(255,0,0); lcd.print("NH3:"); if(c>=0) lcd.print(c); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==1){ d = gas.measure_CO(); lcd.setRGB(255,127,0); lcd.print("CO:"); if(d>=0) lcd.print(d); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==2){ e = gas.measure_NO2(); lcd.setRGB(255,255,0); lcd.print("NO2:"); if(e>=0) lcd.print(e); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==3){ //f = analogRead(0); lcd.setRGB(192,192,192);} //lcd.print("Light:"); //if(f>=0) lcd.print(f); //else lcd.print("invalid"); //lcd.print(" units");} if (buttonPushCounter==4){ g = analogRead(1); r = (float)(1023-g)*10000/g; //resistance calculation t=1/(log(r/10000)/3975+1/298.15)-273.15; //temperature in celsius fah=t*9/5+32; lcd.setRGB(0,0,255); lcd.print("Temp:"); lcd.print(fah); lcd.print(" *F");} if (buttonPushCounter==5){ g = analogRead(1); r = (float)(1023-g)*10000/g; //resistance calculation t=1/(log(r/10000)/3975+1/298.15)-273.15; //temperature in celsius lcd.setRGB(75,0,130); lcd.print("Temp:"); lcd.print(t); lcd.print(" *C");} //if (buttonPushCounter==6){ //h = analogRead(3); //lcd.setRGB(143,0,255); //lcd.print("Noise:"); //if(h>=0) lcd.print(h); //else lcd.print("invalid"); //lcd.print(" units");} if (buttonPushCounter==7){ buttonPushCounter=0; lcd.setRGB(255,255,255); } delay(250); lcd.clear();}

    if your not calibrating

    /* Code for Environmental Sensor that takes air quality, light, temperature, and noise data from the environment to display on a lcd screen*/#include <Wire.h>#include "MutichannelGasSensor.h"#include "rgb_lcd.h"rgb_lcd lcd;const int buttonPin = 8;int buttonPushCounter = 0;int buttonState = 0;int lastButtonState = 0;void setup(){ lcd.begin(16, 2); // set up the LCD's number of columns and rows Serial.begin(9600); // start serial for output lcd.setRGB(225, 0, 0); lcd.print("Power On!"); lcd.noAutoscroll(); gas.begin(0x04);//the default I2C address of the slave is 0x04 //gas.changeI2cAddr(0x04); //Calibrate Gas Sensor //gas.doCalibrate(); pinMode(buttonPin, INPUT);}void loop(){ float c; float d; float e; …

    see more »

    /* Code for Environmental Sensor that takes air quality, light, temperature, and noise data from the environment to display on a lcd screen*/#include <Wire.h>#include "MutichannelGasSensor.h"#include "rgb_lcd.h"rgb_lcd lcd;const int buttonPin = 8;int buttonPushCounter = 0;int buttonState = 0;int lastButtonState = 0;void setup(){ lcd.begin(16, 2); // set up the LCD's number of columns and rows Serial.begin(9600); // start serial for output lcd.setRGB(225, 0, 0); lcd.print("Power On!"); lcd.noAutoscroll(); gas.begin(0x04);//the default I2C address of the slave is 0x04 //gas.changeI2cAddr(0x04); //Calibrate Gas Sensor //gas.doCalibrate(); pinMode(buttonPin, INPUT);}void loop(){ float c; float d; float e; int f; float g; int h; float r; float t; float fah; gas.powerOn(); buttonState = digitalRead(buttonPin); // compare the buttonState to its previous state if (buttonState != lastButtonState) { if (buttonState == HIGH) { buttonPushCounter++; } // Delay a little bit to avoid bouncing delay(50); } if (buttonPushCounter==0){ c = gas.measure_NH3(); lcd.setRGB(255,0,0); lcd.print("NH3:"); if(c>=0) lcd.print(c); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==1){ d = gas.measure_CO(); lcd.setRGB(255,127,0); lcd.print("CO:"); if(d>=0) lcd.print(d); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==2){ e = gas.measure_NO2(); lcd.setRGB(255,255,0); lcd.print("NO2:"); if(e>=0) lcd.print(e); else lcd.print("invalid"); lcd.print(" ppm");} if (buttonPushCounter==3){ //f = analogRead(0); lcd.setRGB(192,192,192);} //lcd.print("Light:"); //if(f>=0) lcd.print(f); //else lcd.print("invalid"); //lcd.print(" units");} if (buttonPushCounter==4){ g = analogRead(1); r = (float)(1023-g)*10000/g; //resistance calculation t=1/(log(r/10000)/3975+1/298.15)-273.15; //temperature in celsius fah=t*9/5+32; lcd.setRGB(0,0,255); lcd.print("Temp:"); lcd.print(fah); lcd.print(" *F");} if (buttonPushCounter==5){ g = analogRead(1); r = (float)(1023-g)*10000/g; //resistance calculation t=1/(log(r/10000)/3975+1/298.15)-273.15; //temperature in celsius lcd.setRGB(75,0,130); lcd.print("Temp:"); lcd.print(t); lcd.print(" *C");} //if (buttonPushCounter==6){ //h = analogRead(3); //lcd.setRGB(143,0,255); //lcd.print("Noise:"); //if(h>=0) lcd.print(h); //else lcd.print("invalid"); //lcd.print(" units");} if (buttonPushCounter==7){ buttonPushCounter=0; lcd.setRGB(255,255,255); } delay(250); lcd.clear();}

    View Instructable »
  • error message Arduino: 1.8.4 (Mac OS X), Board: "Arduino/Genuino Uno"/Users/matthew/Desktop/Sensor/Sensor.ino: In function 'void setup()':Sensor:15: error: 'mutichannelGasSensor' was not declared in this scope mutichannelGasSensor.begin(0x04);//the default I2C address of the slave is 0x04 //mutichannelGasSensor.changeI2cAddr(0x04); ^/Users/matthew/Desktop/Sensor/Sensor.ino: In function 'void loop()':Sensor:33: error: 'mutichannelGasSensor' was not declared in this scope mutichannelGasSensor.powerOn(); } ^/Users/matthew/Desktop/Sensor/Sensor.ino: At global scope:Sensor:35: error: 'buttonState' does not name a type buttonState = digitalRead(buttonPin); // compare the buttonState to its previous state ^Sensor:36: error: expected unqualified-id before 'if' if (buttonState != lastB…

    see more »

    error message Arduino: 1.8.4 (Mac OS X), Board: "Arduino/Genuino Uno"/Users/matthew/Desktop/Sensor/Sensor.ino: In function 'void setup()':Sensor:15: error: 'mutichannelGasSensor' was not declared in this scope mutichannelGasSensor.begin(0x04);//the default I2C address of the slave is 0x04 //mutichannelGasSensor.changeI2cAddr(0x04); ^/Users/matthew/Desktop/Sensor/Sensor.ino: In function 'void loop()':Sensor:33: error: 'mutichannelGasSensor' was not declared in this scope mutichannelGasSensor.powerOn(); } ^/Users/matthew/Desktop/Sensor/Sensor.ino: At global scope:Sensor:35: error: 'buttonState' does not name a type buttonState = digitalRead(buttonPin); // compare the buttonState to its previous state ^Sensor:36: error: expected unqualified-id before 'if' if (buttonState != lastButtonState) ^exit status 1'mutichannelGasSensor' was not declared in this scopeThis report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences.

    Could you email the fix the matthew-campbell@hughandann50.com

    copied code from above

    View Instructable »
  • Environmental Pollution Visualization Machine

    I am having a problem with the code it says:

    View Instructable »
  • Here are the lid and case

    Here is the box and lid!

    View Instructable »