Giter Site home page Giter Site logo

dylos_raspberrypi's Introduction

DIY Wi-Fi Streaming Air Quality Monitor

Analyze the air quality around you and live-stream the data automatically via Internet of Things (IoT) using Ubidots as a platform.

Materials

  • Raspberry Pi with Wi-Fi and USB to Serial Port
  • Dylos DC1100 Air Sensor
  • Ubidots account (Free for education purposes : http://things.ubidots.com/)

Methods

  1. Set up your Raspberry Pi (https://www.raspberrypi.org/documentation/setup/)
  2. Set up a free Ubidots Education account and install Ubidots for Python (See https://raspi-temp-rep.readthedocs.io/en/master/ubidots/#ubidots-python-api-client)
  3. In Ubidots, set your device name and create two variables. Take note of your API key found by clicking on your username at the top-right corner and going to API Credentials, as well as the API ID of each of your variables.
  4. Place the main.py Python script into your Raspberry Pi. Verify that the port is connected to '/dev/ttyUSB0'. Make sure you change the API label and API Variable IDs to the ones you obtained on the Ubidots website or it will not work.
  5. Run main.py in the Python 3 Shell within your Raspberry Pi.
  6. Play around with Ubidots Dashboard settings and visualize the data however you want. See http://things.ubidots.com/ubi/getchart/page/D2D3POf_hx-xN2s5ljrVWFStD7k for an example output.

Troubleshooting

How do I know what port my Raspberry Pi's USB to Serial is connected to?

  • In your Raspberry Pi's terminal, run dmesg | grep tty to return the following:
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:0F:BA:25 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.001308] console [tty1] enabled
[    1.021810] 20201000.serial: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    1.030841] 20215040.serial: ttyS0 at MMIO 0x0 (irq = 160, base_baud = 31250000) is a 16550
[   11.838199] usb 1-1: pl2303 converter now attached to ttyUSB0

which means that the USB to Serial converter is attached to ttyUSB0, which is what we label our port in main.py.

I can't find my API ID

Click your Ubidots username and click API Credentials and your API key should pop out

API Credentials

API Key

I can't find my API Variable IDs

Click on a specific variable that you created in your device and it should show up on the left-hand side.

PPM 2.5 API ID

PPM 10 API ID

dylos_raspberrypi's People

Contributors

drjct avatar

Stargazers

 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.