HC-SR04 distance sensor Python code on Orange Pi

Connect the HC-SR04 to Orange Pi

The HC-SR04 is a cheap and easy to use sensor, used to measure distance with ultrasound. It can be used in many projects where you trigger an action based on an object or person entering an area, like an “alarm”, as I showed in my previous post. Also, you often see this sensor as part of more interesting projects such as robots, like this one.

Read more…


Temperature sensor on Orange Pi with Python code

In my previous IoT project on the Orange Pi I showed how to read a DHT22 or a DHT11 temperature and humidity sensor. That project involved connecting the sensor to the GPIO pins and writing C code to read the sensor. In this example I will show you how do the same, but using Python code instead.

Read more…


Ultrasonic distance sensor

Connect the ultrasonic sensor to the Orange Pi

In this tutorial we will learn how to connect a HC-SR04 ultrasonic range sensor to the Orange Pi. This sensor measures distance from the sensor to an object by using ultrasounds. This is similar to how animal echolocation works, for example bats navigating in total darkness. Also, it’s how the submarine’s sonar detects objects under the sea.

Read more…