Using Raspberry Pi GPIO to Light Up an LED

Using Raspberry Pi GPIO to Light Up an LED

It is believed that the first task for anyone learning Arduino or other microcontrollers is to light up an LED, similar to the ‘Hello World’ program in C language. This time, we will also try to light up an LED using the GPIO of the Raspberry Pi. 1. Understanding Raspberry Pi B’s GPIO GPIO (General-purpose … Read more

Raspberry Pi Serial Communication with External Devices

Raspberry Pi Serial Communication with External Devices

From the relevant information about the Raspberry Pi, we can see that there are two serial ports available: one is the hardware serial port (/dev/ttyAMA0), and the other is the mini serial port (/dev/ttyS0). The hardware serial port has a separate baud rate clock source, providing better performance and stability; the mini serial port has … Read more

Raspberry Pi 3B+ Servo Motor Control Code

Raspberry Pi 3B+ Servo Motor Control Code

The control of the servo generally requires a 20ms timing pulse, where the high level part of this pulse is typically within the range of 0.5ms to 2.5ms for angle control. For a 180-degree servo, the corresponding control relationship is as follows:0.5ms————–0 degrees;1.0ms————45 degrees;1.5ms————90 degrees;2.0ms———–135 degrees;2.5ms———–180 degrees;Please see the illustrative description below: The operating voltage … Read more