NelsonPython / Enviro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enviro

Enviro senses temperature, pressure, light, local color (RGB channels), accelerometer readings, and magnetometer data using Enviro pHat sensors and Raspberry Pi Zero W

Enviro pHat

Raspberry Pi Zero W

The Raspberry Pi Mega Kit includes a Raspberry Pi Zero W with GPIO header attached plus a 16GB MicroSD memory card with the Raspbian operating system installed. You can use your own memory card and download and install Raspbian

Interacting with Raspberry Pi Zero W

Use a miniHDMI-to-HDMI adaptor to connect Enviro to a monitor or TV. Use a microUSB-to-USB adaptor to plug-in a keyboard or mouse. I recommend a USB hub so you can connect both of them. Power Raspberry Pi with a wall plug or a USB battery capable of powering mobile phones.

You can connect remotely using Secure Shell (SSH) but you must enable SSH. Click the raspberry icon on the menu. Select Preferences, then select Raspberry Pi Configuration. Click the Interfaces tab and enable SSH.

Window for enabling SSH as described in text

Building your device

Solder a pin header to the EnviroPhat board and snap the board onto your Raspberry Pi. Follow this tutorial to install the EnviroPhat software and test your device.

Known bugs

Verifying the version of Python

The Raspbian operating system comes with two versions of Python pre-installed. This tutorial uses Python 3. Verify that this version is installed:

python3 --version
$ Python 3.4.2
pip3 --version
$ pip 1.5.6 from /usr/lib/python3/dist-packages (python 3.4)

Gathering your data

Sensor readings such as temperature and light are easy to understand. Heading is the offset, in degrees, from magnetic north. An accelerometer measures motion. Here are the accelerometer basics

Watching Enviro sense data

Sending sensor data in csv or json format

Saving sensor data in a MySQL database table

Investigating your data

Charting sensor data on ThingSpeak

Experimenting

What's the temperature on the AV?

Hey - the stove burner is on

About


Languages

Language:Python 100.0%