Skip to content

psidex/PyonAir-pycom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyonAir

PyonAir is a low-cost open-source air pollution monitor developed at the University of Southampton. The monitor measures particulate matter (PM), temperature, and humidity. It also associates the readings with location pulled from GPS.

PyonAir

User guide

To build your own PyonAir, please visit our GitBook: https://s-u-pm-sensor.gitbook.io/pyonair/

Included are: -An overview of the hardware -A step-by-step guide to buying, building and installing your PyonAir -Additional resources to support PyonAir customisation

Getting Started

After wiring all the components, next step is to setup the software. If you already have the latest version of the firmware on your LoPy, drivers, and development environment for Pycom boards, you can skip to Installation.

Prerequisites

Follow the instructions on https://docs.pycom.io/gettingstarted/installation/ to setup your device and your development environment.

Installation

  1. Pull the repository using:

    git clone https://github.com/pyonair/PyonAir-pycom.git
    

    or alternatively use GitHub Desktop to clone the repository.

  2. Connect your PyonAir with a FTDI-USB cable to your machine and open the repository in your editor (Atom or VSC) with Pymakr plugin enabled. Connect to your device with Pymakr. In case of issues, please refer to: https://docs.pycom.io/pymakr/installation/

  3. When connected, hit the upload button to flash the code into your LoPy.

Congratulations! You are now setup and ready to configure your device 😎

Configuration

When configuring the device for the first time, it should automatically switch itself into configuration mode, indicated by continuous blue light. The device creates a WiFi AP named NewPyonAir, the password is newpyonair. After connecting your machine or phone to its WiFi, in your browser, navigate to http://192.168.4.10. The configuration page will show up. After filling all the values and pressing Save, the device will reboot, initialise itself (amber light finished with green blink), and continue running according the configuration.

If required to reconfigure the device, simply hold the button for 3 seconds, which enters the configuration mode (constant blue light), then follow the steps above.

Debugging

  • Once the device is plugged, it starts initialisation, which is indicated by amber light.
  • Successful initialisation is indicated by green light blinking twice
  • Red light blinking immediately after boot indicates an issue with SD Card (perhaphs it is not plugged in or is not formatted correctly) or an issue with the Real Time Clock. This error will not be logged into a logging file; however, it still can be seen in Pymakr's REPL if the LoPy is connected to your machine.
  • Red light flashing during initialisation indicates an issue somewhere else. This issue will be logged into status_log.txt file saved on the SD Card. This error can also be seen in Pymakr's REPL after connecting LoPy to your machine.
  • Red blinks during normal operation indicates runtime errors.
  • Purple light means the device is performing a hardware test, which you can initialise by setting the "hardware_test" variable in the config to "yes"

If there are any issues, please report them on GitHub Issues.

Built With/Using

Contributing

You can submit your fixes/features via Pull requests, alternatively contact one of the developers/supervisors.

Credits

Project supervised by Dr Steven J Johnston. Special thanks to Dr Steven J Johnston, Dr Philip J Basford, and Florentin Bulot for advice, insights, and help with debugging.

Authors

See also the list of contributors who participated in this project.

License

To be added.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 90.7%
  • HTML 8.7%
  • Other 0.6%