Look at the Enviro pHat

In this article we will take a look at the EnviroPhat, a very useful hat for your Raspberry Pi’s which contains many useful sensors. Here is a picture of the hat

enviro_phat

The envirophat by Pimoroni is a hat which can be used with the Raspberry Pi 3, 2, B+, A+, and Zero boards. The hat has 4 different sensors on board which can be used for various measurements, lets take a look at these

 

  • BMP280 temperature/pressure sensor
  • TCS3472 light and RGB colour sensor
  • LSM303D accelerometer/magnetometer sensor
  • ADS1015 4-channel 3.3v, analog to digital sensor

So as you can see from the list above you can measure temperature, pressure, light, colour, acceleration and compass direction. With this in mind you can quite easily add one of these and create some great projects.

The hat has a python library, you can easily install this by opening a new terminal window type the following and follow the instructions:

curl -sS https://get.pimoroni.com/envirophat | bashOnce installed you are ready to go, so lets look at some examples

 

Using the BMP280

Either open a new python shell or save the following as a py file such as bmp180.py

from envirophat import weather
print weather.temperature()
print weather.pressure()

Run the code example and you will see the temperature and pressure in the termianl window

 

Using the LSM303

In this example we will read and display the accelerometer values,

from envirophat import motion
x, y, z = motion.accelerometer()
print x, y, z

 

That’s only a couple of examples, there are more that can be done using the ADC, magnetometer, RGB and light sensor. The hat is priced at about the £16 which when you consider it contains these 4 sensors is good value, the ease of use where you simply connect the hat to your Pi rather than multiple sensors with cables everywhere is also a plus.

I would give this hat a rating of 5 out of 5.

Links

 https://shop.pimoroni.com/products/enviro-phat

SHARE
Previous articleAdding network capabilities to your Pi Zero
Next articleLook at the RasPiO Analog Zero