Chapter 27 Solder Circuit Board
280
Connect the Circuit
Connect the board to Raspberry Pi with jumper wire in the following way.
D
S
—
G
P
IO
.1
7
ST
_C
P
—
G
P
IO
27
SH
_C
P
—
G
P
IO
22
G
N
D
—
G
N
D
V
C
C
—
3.3
V
/5
V
Code
This is the third time we have made flowing water light. In this project, we solder a completely new circuit for
flowing water light. Additionally, the program is also different from previous ones. When this light flows, it will
bring a long tail.
C Code 27.2.1 LightWater03
First observe the project result, and then analyze the code.
1.
Use cd command to enter 27.2.1_LightWater03 directory of C code.
cd ~/Freenove_Ultimate_Starter_Kit_for_Raspberry_Pi/Code/C_Code/27.2.1_LightWater03
2.
Use following command to compile “LightWater03.c” and generate executable file “LightWater03”.
gcc LightWater03.c -o LightWater03 -lwiringPi
3.
Then run the generated file “LightWater03”.
sudo ./LightWater03
After the program is executed, the LEDs will light up in the form of flowing water and carry a long tail.
Summary of Contents for Ultimate Starter Kit
Page 1: ...Free your innovation Freenove is an open source electronics platform www freenove com ...
Page 117: ...117 Chapter 9 Potentiometer RGBLED www freenove com support freenove com Hardware connection ...
Page 155: ...155 Chapter 14 Relay Motor www freenove com support freenove com Hardware connection OFF 3 3V ...
Page 173: ...173 Chapter 16 Stepping Motor www freenove com support freenove com Hardware connection ...
Page 239: ...239 Chapter 22 Matrix Keypad www freenove com support freenove com Circuit Schematic diagram ...
Page 240: ...Chapter 22 Matrix Keypad 240 www freenove com support freenove com Hardware connection ...