Giter Club home page Giter Club logo

diy_air_sensor's Introduction

diy_air_sensor

This is the project for the DIY Air Quality Sensor. The code right now is, frankly, atrocious. There are things I did in there that I don't care to remember, but they haunt me when I close my eyes. This project started as a quick-and-hacky sensor project and morphed one-device-by-one-device into something akin to a coral colony, or maybe a cancer. Anyway, whatever you do, DO NOT USE THIS CODE. It will scare your children and sleep with your wife.

Bit-by-bit, I'm going to build some tests then start refactoring. I'll remove this readme-of-shame when I have something resembling real code.

TODO List:

  • Move Arduino library build dependencies to git submodules
  • Clang fuzz tests
  • Clang tidy integration
  • Clang static analysis

Code Structure

diy_air_sensor

This top-level directory is can be used with the Arduino IDE to build diy_air_sensor.ino. The project builds files in the src and include directories. The CMakeLists.txt in this directory can also be used to cross-compile arduino project from the commandline. You will find the .gitignore, .travis.yml, and all other files related to integrating with external tools (like coveralls) at this level.

This also contains run_lint.bash, which will run the linter on all relevant files. If you check in un-linted files, travis will yell at you.

src

Contains the source code for the diy_air_sensor project. Look at DiyAirSensor.hh / .cpp to find the top-level init and loop logic.

include

Contains headers shared between projects.

log_file_sender

This is the second Arduino project and is built separately from the diy_air_sensor project. diy_air_sensor sends data via a serial port to the log_file sender, which writes the data to a file on an SD card. We do this because the ATMega328 does not have enough RAM to run the SD stack and anything else at the same time.

test

This directory contains test files. Tests build on Linux or Mac platforms and cover both diy_air_sensor and log_file_sender projects. They also produce code coverage reports. Run the ./build.sh file in this directory to build and run the tests.

Gas sensor info

item Part Number Quantity link Description Est Cost
1 MQ5 1 LPG, City Gas Leak $2
2 MQ7 1 Carbon Monoxide $3.50
3 MQ131 1 Ozone $30
4 MQ9 1 Gas leaks $2
5 MQ135 1 Poison Gasses (organic) $2
6 GP2Y1010AU0F 1 PM2.5 sensor $18
7 Nano 2 Arduino Nano $10
8 --- 1 F-F Breadboard cables $6
9 ENCL 1 3d printed enclosure $3
10 LK51-CA 1 4-line I2C LCD module $12
11 3-01-0038-5PCS 1 SD Card module $5

3D Printed Enclosure

See https://www.thingiverse.com/thing:4669454.

Calibration

Once I have calibrated my own system, I will post instructions here.

Assembly instructions

I may (or may not) add assembly instructions eventually

diy_air_sensor's People

Contributors

bmleedy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.