MPU6050 Interfacing with Raspberry Pi using ‘C’


  • MPU6050 sensor module is an integrated 6-axis Motion tracking device.
  • It has a 3-axis Gyroscope, 3-axis Accelerometer, Digital Motion Processor and a Temperature sensor, all in a single IC.
  • It can accept inputs from other sensors like 3-axis magnetometer or pressure sensor using its Auxiliary I2C bus.
  • If external 3-axis magnetometer is connected, it can provide complete 9-axis Motion Fusion output.
  • A microcontroller can communicate with this module using I2C communication protocol. Various parameters can be found by reading values from addresses of certain registers using I2C communication.
  • Gyroscope and accelerometer reading along X, Y and Z axes are available in 2’s complement form.
  • Gyroscope readings are in degrees per second (dps) unit; Accelerometer readings are in g unit.

For more information about MPU6050 Sensor Module and how to use it, refer the topic MPU6050 Sensor Module in the sensors and modules section.

Read More

BME280 I2C Temperature and Pressure Sensor

The BME280 device is a digital barometric pressure sensor and is a slightly upgraded version of the BMP180. This is available on a small module which provides access to the sensor via the I2C interface. This allows us to easily connect it to the Raspberry Pi and read the data using Python. The BME280 provides temperature, pressure and humidity.

The BME280 is made by Bosch and the official BME280 datasheet includes all the technical details. Their device can offer both SPI and I2C interfaces so you need to make sure your module provides the interface you prefer.

My module is a small pcb measuring 14x10mm with a 4 pin I2C header. The order of the pins may vary on other modules so keep an eye on the labels so you connect up the correct wires from the Pi.
Read More

Raspberry Pi weather station using the Sense HAT

Today, we are going to  set up a Raspberry Pi weather station that can be accessed over the internet. For this, we need the Sense HAT, a Raspberry Pi add-on board that was made especially for the Astro Pi mission. The Astro Pi mission sent two Raspberry Pis (each equipped with a Sense HAT and a few other improvements) to the International Space Station, where they joined British astronaut Tim Peake and helped record information about environmental conditions up there in the space ship.Read More

Interfacing DHT11 Raspberry Pi with LCD Readout

Temperature and Humidity are the most common parameters that are being monitored in any environment. There are tons of sensors to choose from for measuring temperature and humidity, but the most used one is the DHT11 due to its decent measuring range and accuracy. It also works with one pin communication and hence is very easy to interface with Microcontrollers or Microprocessors. In this tutorial we are going to learn how to interface the popular DHT11 sensor with Raspberry Pi and display the value of temperature and humidity on a 16×2 LCD screen.

Overview of DHT11 Sensor:

The DHT11 sensor can measure relative humidity and temperature with the following specifications

Temperature Range: 0-50°C
Temperature Accuracy: ±2 °C
Humidity Range: 20-90% RH
Humidity Accuracy: ±5 %

Read More

Temperature Sensing With Raspberry Pi

The Raspberry Pi lacks analogue input, and while it’s possible to use an Analogue to Digital Converter (ADC), the DS18B20 is a fantastic, easy to use digital sensor that uses the Dallas 1 wire communication interface. Fortunately for us, the Raspberry Pi comes with built in software handling for 1 wire sensors which makes using sensors such as the DS18B20 pretty straightforward.

What is 1-Wire Communication

The Dallas 1-Wire protocol is a method of serial communication designed for simple communication between 1 Master and multiple Slave devices. Serial communication means that data is sent bit-by-bit along a single data line.Read More

Do NOT follow this link or you will be banned from the site!