SunFounder RasPad 3
Code Explanation
dht11 = DHT11.DHT11(17)
Instantiate a dht11 object.
def
getTem():
result = dht11.get_result()
while
True:
if
result:
break
else
:
result = dht11.get_result()
return
result[1]
The temperature (
result[1]
) is obtained by this function, and the function will not be interrupted until the reading
is successful.
def
getHum():
result = dht11.get_result()
while
True:
if
result:
break
else
:
result = dht11.get_result()
return
result[0]
The humidity (
result[0]
) is obtained by this function, and the function will not be interrupted until the reading is
successful.
variables = {
'Room Temp': {
(continues on next page)
7.5. Cloud4RPi
107
Содержание RasPad 3
Страница 1: ...SunFounder RasPad 3 www sunfounder com May 10 2022 ...
Страница 2: ......
Страница 6: ...SunFounder RasPad 3 2 Contents ...
Страница 8: ...SunFounder RasPad 3 4 Chapter 1 SAFETY NOTICES ...
Страница 9: ...5 ...
Страница 10: ...SunFounder RasPad 3 Chapter 2 COMPONENTS LIST 6 Chapter 2 COMPONENTS LIST ...
Страница 15: ...SunFounder RasPad 3 Connect the two Micro HDMI cables Note Cable A is slightly longer than Cable B 11 ...
Страница 16: ...SunFounder RasPad 3 Connect the USB C cable 12 Chapter 3 ASSEMBLY INSTRUCTIONS ...
Страница 23: ...SunFounder RasPad 3 19 ...
Страница 24: ...SunFounder RasPad 3 20 Chapter 3 ASSEMBLY INSTRUCTIONS ...
Страница 27: ...SunFounder RasPad 3 Select the SD card you are using Click the WRITE button 4 1 Install the Raspberry Pi OS 23 ...
Страница 34: ...SunFounder RasPad 3 Now you can use this keyboard to edit your files or codes 30 Chapter 4 QUICK USER GUIDE ...
Страница 38: ...SunFounder RasPad 3 34 Chapter 4 QUICK USER GUIDE ...
Страница 50: ...SunFounder RasPad 3 46 Chapter 6 INTERFACES INTRODCTION ...
Страница 51: ...SunFounder RasPad 3 6 3 Connect Headphones or Other Screens 47 ...
Страница 52: ...SunFounder RasPad 3 48 Chapter 6 INTERFACES INTRODCTION ...
Страница 77: ...SunFounder RasPad 3 Select the device type ESP32 for example 7 4 Home Assistant 73 ...
Страница 85: ...SunFounder RasPad 3 3 Select the content you want to share to Home Assistant 7 4 Home Assistant 81 ...
Страница 127: ...SunFounder RasPad 3 First delete the original sprite we donâA Z t need it Then choose a sprite 7 7 Scratch Projects 123 ...
Страница 129: ...SunFounder RasPad 3 7 7 Scratch Projects 125 ...
Страница 142: ...SunFounder RasPad 3 Add the Banana sprite and adjust the angle 138 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 143: ...SunFounder RasPad 3 Also let it appear at the right time 7 7 Scratch Projects 139 ...
Страница 146: ...SunFounder RasPad 3 142 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 150: ...SunFounder RasPad 3 Set the balloon to a random position 146 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 151: ...SunFounder RasPad 3 Let it change the color and size randomly 7 7 Scratch Projects 147 ...
Страница 156: ...SunFounder RasPad 3 152 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 157: ...SunFounder RasPad 3 7 7 Scratch Projects 153 ...
Страница 162: ...SunFounder RasPad 3 158 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 175: ...SunFounder RasPad 3 7 7 Scratch Projects 171 ...
Страница 181: ...SunFounder RasPad 3 Copy out the second Trees 7 7 Scratch Projects 177 ...
Страница 182: ...SunFounder RasPad 3 178 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 188: ...SunFounder RasPad 3 184 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 192: ...SunFounder RasPad 3 Then we add the Pen extension function 188 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 201: ...SunFounder RasPad 3 Use the value of the variable âA IJwidthâA I as the size of the Pencil 7 7 Scratch Projects 197 ...
Страница 202: ...SunFounder RasPad 3 198 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 204: ...SunFounder RasPad 3 200 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 222: ...SunFounder RasPad 3 218 Chapter 7 RASPAD PROJECTS AND ACTIVITIES ...
Страница 225: ...SunFounder RasPad 3 In the Interfaces option Enable the Camera and then click OK 8 1 Assemble the Camera Module 221 ...