SunFounder TS-10 10.1-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
5.5. Cloud4RPi
89
Summary of Contents for TS-10
Page 1: ...SunFounder TS 10 10 1 inch Touch Screen www sunfounder com Nov 19 2021 ...
Page 2: ......
Page 6: ...SunFounder TS 10 10 1 inch Touch Screen 2 CONTENTS ...
Page 9: ...SunFounder TS 10 10 1 inch Touch Screen 5 ...
Page 10: ...SunFounder TS 10 10 1 inch Touch Screen 6 Chapter 1 HARDWARE DESCRIPTION ...
Page 16: ...SunFounder TS 10 10 1 inch Touch Screen 12 Chapter 2 INSTALL THE RASPBERRY PI OS ...
Page 21: ...SunFounder TS 10 10 1 inch Touch Screen pi 3 Step 5 17 ...
Page 141: ...SunFounder TS 10 10 1 inch Touch Screen 5 7 Scratch Projects 137 ...
Page 165: ...SunFounder TS 10 10 1 inch Touch Screen 5 7 Scratch Projects 161 ...
Page 167: ...SunFounder TS 10 10 1 inch Touch Screen 5 7 Scratch Projects 163 ...
Page 181: ...SunFounder TS 10 10 1 inch Touch Screen 5 7 Scratch Projects 177 ...
Page 209: ...SunFounder TS 10 10 1 inch Touch Screen 205 ...
Page 210: ...SunFounder TS 10 10 1 inch Touch Screen 206 Chapter 7 3D PRINTED SUPPORT ...
Page 212: ...SunFounder TS 10 10 1 inch Touch Screen 208 Chapter 8 FAQ ...