Raspberry Pi_Eng_25.3.1 Current, Resistance, and Voltage

25.3 Basics of Electricity/Electronics

Here, we will explain the basics of electricity and electronics.

If you need additional information, please refer to the following:

■ http://portal.hrd.go.kr/EL/contents/084/01/ch01_02.htm

■ http://cafe.daum.net/kneeng

■ http://blog.daum.net/hongbkim/2542

■ http://blog.naver.com/dhjdhj11/150184044066

Raspberry Pi_Eng_25.2.3 Precautions and Features in Using GPIO

25.2.3 Precautions and Features in Using GPIO

● Precautions in using GPIO pin

■ When powering Raspberry Pi, make sure that metal object does not touch the GPIO pin.

■ Do not supply more than total 250mA current from 5V power pin.

■ Do not supply more than total 50mA current from 3.3V power pin.

■ Do not supply higher than 3.3V to all GPIO pins at the input.

■ Do not use more than 3mA current per pin at the output.

■ Do not supply higher than 5V power to Raspberry Pi.

Raspberry Pi_Eng_25.2.1 GPIO Device

25.2 GPIO Details

25.2.1 GPIO Device

25.2.1.1 GPIO Pin Layout

Since Raspberry Pi B+ model, Raspberry Pi board has a 40-pin GPIO connector with 2 male headers arranged on the left side of SD card slot. The spacing between each header is 2.54 mm (0.1 inches), which is one of the standard spacings used in electronics and is the standard spacing for prototyping platforms including stripeboard and breadboard.

Raspberry Pi_Eng_25.1 Raspberry Pi and External Interface

25.1 Raspberry Pi and External Interface

25.1.1 Meaning of External Interface

Standard PCs like regular desktops can run the same program much faster than Raspberry Pi. However, Raspberry Pi has a capability that these standard PCs can not provide, which is a bidirectional interface with external devices. Raspberry Pi can communicate with and control devices outside the system through an interface with external devices. It can receive input or output through an external device, or control the external device. It is possible to receive a various measuring values ​​from an external sensor, to determine the situation, and to perform appropriate processing accordingly, or to build a system for directly controlling an external system by creating an embedded program.

Raspberry Pi_Eng_25.0 Chapter 25 External Interface

Chapter 25 External Interface

Chapter’s Main Topics

Raspberry Pi can communicate with and control devices outside the system through an interface with external devices. The core device of the Raspberry Pi used here is GPIO (General Purpose Input Output) port. Here, we discuss how to interface with external devices using GPIO.

It includes descriptions on the following topics:
■ GPIO Details

■ Fundamentals of electricity/electronics

■ Fundamentals of Electronic circuit

■ Preparing interface

■ GPIO Library

■ Digital Input/Output interface

■ Interface using sensor

Raspberry Pi_Eng_24.4.9 Including PHP Script File

24.4.9 Including PHP Script File

PHP provides a way to insert ans use the text/code/markup in a specific file into the current working document. This function is very useful when you need to repeatedly use the same PHP, HTML, or text on multiple pages in PHP.

In PHP, “include” or “require” statement allows a web server to insert the contents of a particular PHP file into the PHP file of current document before executing a particular document.

Raspberry Pi_Eng_24.4.8 Function

24.4.8 Function

24.4.8.1 Definition of Function

Function is a unit of statements that can be executed repeatedly within a program. Users can freely define and use a function with arbitrary contents under certain constraints. It is defined in the following format.

function functionName( argument1, argument2, argument3…) {
code to be executed;

[ return; ]

code to be executed;
}

Raspberry Pi_Eng_24.4.7 Stop and Return of Processing

24.4.7 Stop and Return of Processing

24.4.7.1 “exit” Statement and “die” Statement

“exit” statement is a command that prints the specified message and terminates the execution of the PHP script. “die” statement is the same command as “exit” statement.

exit ( [ status-message ] )

exit ( [ status-number ] )