25.9 Action
25.9.1 Relay
This subject is a top-level topic and is not appropriate to describe here, so I will have the opportunity to elaborate further in other books.
25.9.2 Actuator
25.9 Action
25.9.1 Relay
This subject is a top-level topic and is not appropriate to describe here, so I will have the opportunity to elaborate further in other books.
25.9.2 Actuator
25.8.3 Utilizing Digital DHT11 Humidity/Temperature Sensor
25.8.3.1 Feature of the Sensor
Here, we will use a module that integrates DHT11 sensor and other necessary components on a small PCB as shown below. The DHT11 sensor is equipped with resistive humidity measurement components, NTC temperature measurement components, and a high-performance 8-bit microcontroller and provides precise digital signal output. The DHT11 sensor originally has four wires, but this module has three wires.
25.8.2 Measuring Temperature with Digital Sensor DS18b20
25.8.2.1 Features of DS18B20 Sensor
There are many sensors to measure temperature on the market, but Raspberry Pi does not have an ADC (analog to digital converter), so analog temperature sensors like TMP36 can not be used directly.
Here we will measure temperature by connecting the digital sensor DS18B20 directly to Raspberry Pi.
25.8 Sensor
25.8.1 Sensor Overview
A sensor is a device that grasps the state of an object around it and performs a function corresponding to a person’s sense. The sensor detects the condition of the object around it, detects the occurrence of the event, senses and measures the variation of the quantity, and delivers it by an electric signal or an optical signal. There are various kinds of sensors such as a light sensor, a temperature sensor, a gas sensor, a pressure sensor, and a magnetic sensor.
25.7.2 Digital Input – Button Input
Here we will show an example of connecting a button to Raspberry Pi, reading the pin’s input signal, and processing it to see if the button is pressed.
25.7.2.1 Input Method of library
There are falling method and interrupt method to process input using library. The following describes each of them.
25.7 Digital Input/Output
25.7.1 Digital Output – LED On/Off
Here we will try to implement an example of connecting a LED to Raspberry Pi and blinking the LED using a program.
25.7.1.1 Installing LED
When making the circuit, connect a LED, a resistor, and Raspberry Pi using a breadboard as shown below
25.6.3 library
25.6.3.1 Overview of Library
This library provides a class module that allows you to manipulate the GPIO of Raspberry Pi in Python development language.
This library is not suitable for the applications that are in real-time or where time-synchronization is important. Because python can not predict when garbage collect will occur and it runs in a Linux kernel that is not suitable for real-time processing. This is that because Linux is a multitasking O/S, other processors may have a higher priority than the GPIO processing program for the CPU and in that case the GPIO processing program may be confused.
25.6.2 library
25.6.2.1 Overview of Library
library is a GPIO tool developed by Gordon Henderson. This is a GPIO processing library developed in C language for use with the BCM2835 used in Raspberry Pi and is distributed under the terms of the GNU LGPLv3 license. This library was originally developed to make it easier for users familiar with Arduino’s “wiring” system to easily use Raspberry Pi.
25.6 GPIO Library
25.6.1 Meaning of GPIO Library
To use GPIO in a program in Raspberry Pi requires not only a deep understanding of the hardware, but also an expert level of low-level programming knowledge required to manipulate the hardware. The software module that experts have already developed in advance to make it easy for ordinary users to use GPIO functions without experiencing these difficulties is called library. A library means a set of modules made by developing programs to provide various functions that are commonly used and integrating them into a package in the manner that other programs can easily take out and use them.
25.5.7 Sensor
A sensor is a device that grasps the state of an object around it and performs a function corresponding to a person’s sense. The sensor detects the condition of an object around it, detects the occurrence of an event, senses and measures a variation of quantity, and delivers it with an electric signal or optical signal. There are various kinds of sensors such as a light sensor, a temperature sensor, a gas sensor, a pressure sensor, and a magnetic sensor. There are also passive sensors (camera, MSS, TM, HRV) that passively accept the ambient conditions according to the way they operate, and active sensors (Radar, Laser) that send electromagnetic waves and receive it again.