
TS7-Pro 7-inch Touch Screen
(continued from previous page)
'type'
:
'numeric'
,
'bind'
: getTem
},
'CPU Temp'
: {
'type'
:
'numeric'
,
'bind'
: getHum
},
}
The temperature is stored in the
'bind'
of the
'Room Temp'
key, and the humidity is stored in the
'bind'
of the
'CPU Temp'
key. When Cloud4RPi receives the
variables
dictionary, it will convert it into a JavaScript object
that can be recognized by the web page.
Remote Switch
In this project, we will learn to use Cloud4RPi’s Switch to control the relay, thereby controlling the relay’s load-LED.
You can also change the load of the relay to household appliances, but with safety in mind.
Experimental Procedures
Build the circuit.
Open the code.
cd
/home/pi/cloud4rpi-raspberrypi-python
sudo nano remote_switch.py
Find the line below and fill in the correct device token.
DEVICE_TOKEN
=
'__YOUR_DEVICE_TOKEN__'
Run the code.
sudo python3 remote_switch.py
114
Chapter 5. PROJECTS AND ACTIVITIES
Summary of Contents for TS7-Pro
Page 1: ...TS7 Pro 7 inch Touch Screen www sunfounder com Jun 30 2022 ...
Page 2: ......
Page 4: ...8 Copyright Notice 231 ii ...
Page 6: ...TS7 Pro 7 inch Touch Screen 2 CONTENTS ...
Page 10: ...TS7 Pro 7 inch Touch Screen 6 Chapter 1 HARDWARE INTRODUCTION ...
Page 12: ...TS7 Pro 7 inch Touch Screen 8 Chapter 2 ASSEMBLY INSTRUCTIONS ...
Page 32: ...TS7 Pro 7 inch Touch Screen 28 Chapter 3 QUICK USER GUIDE ...
Page 40: ...TS7 Pro 7 inch Touch Screen 36 Chapter 4 ADDING PERIPHERAL DEVICES ...
Page 56: ...TS7 Pro 7 inch Touch Screen 3 Insert the USB Bridge 52 Chapter 4 ADDING PERIPHERAL DEVICES ...
Page 59: ...TS7 Pro 7 inch Touch Screen 4 6 Using as Extension Screen for PC 55 ...
Page 60: ...TS7 Pro 7 inch Touch Screen 56 Chapter 4 ADDING PERIPHERAL DEVICES ...
Page 85: ...TS7 Pro 7 inch Touch Screen Select the device type ESP32 for example 5 4 Home Assistant 81 ...
Page 135: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 131 ...
Page 151: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 147 ...
Page 155: ...TS7 Pro 7 inch Touch Screen Set the balloon to a random position 5 7 Scratch Projects 151 ...
Page 161: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 157 ...
Page 162: ...TS7 Pro 7 inch Touch Screen 158 Chapter 5 PROJECTS AND ACTIVITIES ...
Page 167: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 163 ...
Page 180: ...TS7 Pro 7 inch Touch Screen 176 Chapter 5 PROJECTS AND ACTIVITIES ...
Page 186: ...TS7 Pro 7 inch Touch Screen Copy out the second Trees 182 Chapter 5 PROJECTS AND ACTIVITIES ...
Page 187: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 183 ...
Page 193: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 189 ...
Page 197: ...TS7 Pro 7 inch Touch Screen Then we add the Pen extension function 5 7 Scratch Projects 193 ...
Page 207: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 203 ...
Page 209: ...TS7 Pro 7 inch Touch Screen 5 7 Scratch Projects 205 ...
Page 234: ...TS7 Pro 7 inch Touch Screen 230 Chapter 7 FAQ ...