Git Product home page Git Product logo

esp32-hpma115s0's Introduction

Build Status PlatformIO ViewCount Liberapay Status

CanAirIO firmware

Citizen science project with mobile and fixed sensors for measuring air quality (PM 2.5) using low-cost sensors and smartphones. Built with a ESP32 module board and a dust sensor, interfaced with an CanAirIO Android client app. The current firmware supports multiple boards and sensors, please review the DIY guides in our wiki

Installation

Linux and MacOSx

You can download the last firmware version in releases section. Download the last release from assets section in releases and please uncompress zip file.

USB alternative

Connect your CanAirIO device to your USB and execute the next command for your model board*, like this:

unzip canairio_rev414_20190829.zip
cd canairio_installer
./install.sh canairio_TTGO_T7_rev605_20200925.bin

For more options run ./canairio_installer help.

Note: you need python2 or python3 with pyserial in your system.

Boards supported

TTGO_T7 Please see the CanAirIO v2.1 guide.
TTGO_TQ firmware for TTGO_TQ board WEMOSOLED firmware for ESP32 OLED board

Is possible that the current firmware supports more boards and sensors. Also you can choose the sensor brand or type on the CanAirIO Android app.

OTA alternative

After that you will able to send OTA updates to any board supported, like this:

./install.sh ota canairio_d1mini_rev414_20190829.bin

Also you can specify the IP address:

./install.sh ota canairio_xxx.bin 192.168.1.10

Windows

Please read procedure on firmware section on HacksterIO Guide for details for load firmware via oficial Espressif Download Tool in Windows


[Optional] Compiling and installing

Please install first PlatformIO open source ecosystem for IoT development compatible with Arduino IDE and its command line tools (Windows, MacOs and Linux). Also, you may need to install git in your system.

For default board TTGO_T7, clone and upload firmware via USB cable:

git clone https://github.com/kike-canaries/esp32-hpma115s0.git
cd esp32-hpma115s0
pio run -e TTGO_T7 --target upload

After that, it able for sending updates via OTA protocol using Wifi in your LAN, is more fastest than USB and you can disconnect your board, but you need first save Wifi credentials via Android CanAirIO app see below.

For OTA updates you only run

pio run -e TTGO_T7_OTA --target upload

Also you can specify the IP address on platformio.ini config file

Optional for other board, please select the right environment for example for wemos board:

pio run -e WEMOSOLED --target upload

Also you can change in platformio.ini the next parameters:

-D CORE_DEBUG_LEVEL=0, set to 3 for get more verbose log.
-D EMOTICONS, comment or uncomment for enable emoticons.
upload_port, in OTA section is for set to CanAirIO device IP address.

Building Installer

You can build CanAirIO Installer zip package with all binaries of all board flavors running the next command:

./build all && ./build installer

The directory output is in: releases/installer
Also the binaries flavors directory: releases/binaries/

Troubleshooting

If you have some issues with Bluetooth library internals, or libraries issues, please upgrade all frameworks and tools on PlatformIO:

pio update
sudo pio upgrade
pio run -t clean
rm -rf .pio
pio lib update
pio run --target upload

If you want clear all ESP32 preferences and flash variables, please execute before:

./esptool.py --port /dev/ttyUSB0 erase_flash

Android CanAirIO App

For now you need any Android device with Bluetooth 4 or above. You can download the CanAirIO app from GooglePlay, keep in mind that it is in continuos development then please any feedback, report errors, or any thing please let us knowed it via our contact form or on our Telegram chat

You have two configuration options or modes of your CanAirIO device from the app:

Mobile Station Mode

For record tracks on your device (Sdcard) or publish it to the cloud (share), please follow the next steps:

Connection to device

Recording track and share

NOTE: Also all recorded tracks will be saved in the /sdcard/canairio/ directory on json format.


Static Station Mode

Also, you can connect your CanAirIO device to the WiFi and leave this like a fixed station. In this mode you only need the Android app only for initial settings, after that the device could be publish data without the phone. For this you need configure it in settings section:

Settings

  • Station Name: for example: PM25_Berlin_Pankow
  • Wifi Name and Password:
    • Your Wifi network credentials.
    • Save the credentials with the switch.
  • InfluxDB Cloud: add the next values,
    • Database name: canairio
    • Hostname: influxdb.canair.io
    • Save the settings with the switch.

The data will be configured and showed in CanAirIO Grafana Server.

Settings Tools

  • Reboot device: Only for restart your CanAirIO device
  • Factory Reset: For set all settings to default on your CanAirIO device

TODO

  • Enable/Disable APIs from App (on testing)
  • Locatitation settings via Bluetooth (on testing)
  • OTA updates ready (LAN)
  • Sensors manager is now a library (canairio_sensorlib)
  • Auto detection of PM sensors (see sensorlib doc)
  • Anonymous authentication
  • OTA updates (WAN)
  • Migrate loop to multithread RTOS implementation
  • Dinamic Humidity and Temperature visualization on Display

CanAirIO device HOWTO guide

You can build a device to measure air quality by using a PM2.5 or similar sensor, for then publish it to CanAirio cloud or a personal server using CanAirIO App, more info here:

CanAirIO guide wiki

esp32-hpma115s0's People

Contributors

danielbernalb avatar hpsaturn 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.