Skip to content

iotlab101/pio_filter_dht22

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example PlatformIO Project for esp8266 & dht22

This is an example PlatformIO project to show how to use the arduplot, a PlatformIO plotting community filter (https://github.com/yhur/arduplot.git).

This tools is the equivalent to the Arduino IDE's serial plotter for the PlatformIO

Running it as part of PlatformIO monitor filter

  1. Install the arduplot first
    pip install arduplot
  2. copy ~/.platformio/penv/lib/python3.9/site-packages/arduplot/filter_plotter.py to either
    <Project>/monitor
    for every project, or
    ~/.platformio/platform/espressif8266/monitor (or ~/.platformio/platform/espressif32/monitor for esp32)
    
    Or you can just set the environment variable as below and run this without copying.
    export PLATFORMIO_MONITOR_DIR=${HOME}/.platformio/penv/lib/python3.9/site-packages/arduplot/
  3. With the above steps done, run
    pio device monitor -f plotter
    And you will get this plot.

Screen Shot 2021-11-13 at 9 46 49 PM

Optional Plot Configuration

If you want to put the legends to the plot. There is an optional configuration file where you can set the setting for the plotting for the project.

{
    "label": [
        "temperature",
        "humidity"
    ],
    "title": "Thermometer",
    "width": 100
}

If you create a json file named 'plotcfg.json' under the the PIO project directory, you will get this plot. Screen Shot 2021-11-13 at 9 46 16 PM

About

dht22 example for esp8266 and PlatformIO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages