Code Monkey home page Code Monkey logo

esp32-air-quality-reader's Introduction

esp32-air-quality-reader

An application to read data from a Plantower PMS5003 air quality sensor, written for use with MicroPython on an ESP32 microcontroller. It has a webserver to return the data in JSON format, and /html can be hit to return a pretty(ish) HTML version.

The sensor data extraction code is based on Adafruit's old Python code from before they turned it into a library.

Helpful tools

Setup

It requires a file called config.json at the root of the src directory, configured with your wifi network name and password, the RX pin that the PMS5003 sensor is connected to, and an API key that protects the POST and DELETE endpoints described below. An example file is given in config.example.json.

Endpoints

esp32-air-quality-reader has five HTTP endpoints:

  • GET / — Get the current air quality values in JSON format.
  • GET /html — Get the current air quality values in HTML format.
  • GET /log — View the log file that's written to when errors occur.
  • DELETE /log — Clear the log file; this requires the X-API-Key header to be set with the same value as what you're sending to the endpoint.
  • POST /reset — Restarts the ESP32; as above, it requires the X-API-Key header to be set.

esp32-air-quality-reader's People

Contributors

virtualwolf avatar

Watchers

 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.