Elecrow Raspberry Pi & Arduino Starter Kit User Manual page 63

Table of Contents

Advertisement

Connection
RGB LED
Raspberry Pi
R
GPIO17
G
GPIO27
B
GPIO22
GND
GND
Touch sensor
Raspberry Pi
GND
GND
VCC
VCC
SIG
GPIO18
Code Overview, Compile and run
In our example we'll use both RGB LED and touch sensor, when pressing the touch sensor, we will randomly choose
one colour: red green or blue. Then we will turn the LED of the randomly chosen colour.
If we stop touching the touch sensor, the LED will turn off.
Compile the script by going into the samples directory and running: python3 touch.py
63 of 114

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Raspberry Pi & Arduino Starter Kit and is the answer not in the manual?

Table of Contents