interfacing

Interfacing HC-SR501 PIR Motion Sensor with Raspberry Pi

Contents 1 Working of PIR sensor HC-SR501 1.1 Adjustment 2 Circuit diagram 3 Python Program 4 Output All living beings radiate energy to the surroundings in the form of infrared radiations which are invisible to human eyes. A PIR (Passive infrared) sensor can be used to detect these passive radiations. When an object (human or animal) emitting infrared radiations passes through …

Interfacing HC-SR501 PIR Motion Sensor with Raspberry Pi Read More »

Interfacing an I2C GPIO expander (MCP23017) to the Raspberry Pi using C++ (i2cdev)

The I2C Bus The I2C bus is a two wire bus developed by Phillips/NXP (4-wire if you want to include power and ground), that is used to connect a single master device to up to 120+ slave peripheral devices. The master device is typically a microcontroller, and the slave device(s) is/are typically peripheral chips that …

Interfacing an I2C GPIO expander (MCP23017) to the Raspberry Pi using C++ (i2cdev) Read More »

Interfacing HC-SR04 Ultrasonic Sensor with Raspberry Pi

Ultrasonic distance sensors are designed to measure distance between the source and target using ultrasonic waves. We use ultrasonic waves because they are relatively accurate across short distances and don’t cause disturbances as they are inaudible to human ear. HC-SR04 is a commonly used module for non contact distance measurement for distances from 2cm to …

Interfacing HC-SR04 Ultrasonic Sensor with Raspberry Pi Read More »

Interfacing Digital Compass (HMC5883L) with Raspberry Pi 2 using Python3

Initially, I was working on a maze solving robot. Instead of using ultrasonic and infrared on Arduino Mega for wall following like my friends did, I try to do something different using the digital compass and Raspberry Pi 2. This experience is totally new for me as I’m now using Python instead of C++ (well …

Interfacing Digital Compass (HMC5883L) with Raspberry Pi 2 using Python3 Read More »

Interfacing an SPI ADC (MCP3008) chip to the Raspberry Pi using C++ (spidev)

In this entry I will demonstrate how to interface the MCP3008; an SPI-based analog to digital converter (ADC) integrated chip, to the Raspberry Pi. This enables  the Raspberry Pi to interpret analog voltages that are in turn typically emitted by analog-based sensors to reflect a measure of  a physical characteristic such as acceleration, light intensity …

Interfacing an SPI ADC (MCP3008) chip to the Raspberry Pi using C++ (spidev) Read More »

Scroll to Top