The_Official_Raspberry_Pi_-_Beginner’s_Book_Vol1,_2018 (1)
Chapter 7 Physical Computing with the Sense HAT 161 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE 5 Figure 7-7: Scrolling a message ...
162 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE 5 Figure 7-8: Changing the colour of the message and background If you want to us ...
Chapter 7 Physical Computing with the Sense HAT 163 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE Click Run, and you’ll see the let ...
164 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE 5 Figure 7-10: LED matrix coordinates system There are eight LEDs in each row of ...
Chapter 7 Physical Computing with the Sense HAT 165 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE when clicked set all pixels to wh ...
166 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE Click the green flag, and your program will run the same as before: all the LEDs ...
Chapter 7 Physical Computing with the Sense HAT 167 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE Click the green flag, and you’ll ...
168 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE Pictures in Python Start a new program in Thonny and save it as Sense HAT Drawing ...
Chapter 7 Physical Computing with the Sense HAT 169 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE The sense.clear() is designed to ...
170 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE 5 Figure 7-15: Use the sense.clear function to turn off all the LEDs To create yo ...
Chapter 7 Physical Computing with the Sense HAT 171 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE Before you click Run, look at the ...
172 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE 5 Figure 7-16: Displaying an image on the matrix You can also rotate and flip ima ...
Chapter 7 Physical Computing with the Sense HAT 173 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE Then go to the bottom and type: w ...
174 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE Sensing the world around you The Sense HAT’s LED matrix is fun, but its real powe ...
Chapter 7 Physical Computing with the Sense HAT 175 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE 5 Figure 7-18: Showing the pressu ...
176 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE For the temperature sensor, it’s as easy as deleting the humidity block and repla ...
Chapter 7 Physical Computing with the Sense HAT 177 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE pressure = sense.get_pressure() p ...
178 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE 5 Figure 7-22: Displaying the humidity sensor reading For the temperature sensor, ...
Chapter 7 Physical Computing with the Sense HAT 179 THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE ptemp = sense.get_temperature_fro ...
180 THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE Inertial sensing The gyroscopic sensor, accelerometer, and magnetometer combine t ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf