Tuesday, January 16, 2018

Pressure, Temp, accel, gps, sensors for RPi




These are the parts

  • 20U7 GPS from Sparkfun  
  • BME280 breakout from Adafruit 
  • GY-87 from Ebay
    • MPU-6050
    • BMP-180
    • HMC5883L


First enable i2c and download tools. By following the directions here.

Once this is done we can check for devices using:
sudo i2cdetect -y 1

My result shows i2c devices on 2A, 68 and 77.

  • 0x77 is the BME280 pressure/temperature/humidity sensor it can be 0x76 if you add a jumper
  • 0x68 is the MPU-6050 which has the HMC5883L as a slave
  • 0x2A is the FLIR Lepton

First I am going to work on getting the pressure/temperature sensors to work.  I have two sensors for this:

BME280 - Pressure, humidity and temperature
BMP180 - Pressure and temperature data included on GY-87 board

I will use the Adafruit BME280 driver for python which depends on Adafruit GPIO library.

After following the instructions to get everything installed.  I can read the temperature and pressure from my BME280.  I had to change a line in Adafruit_BME280.py so that I could use my BME280 on i2c 0x76 instead of the default 0x77.

Now I am ready to try out the IMU sensors.