| Moteur de recherche de fiches techniques de composants électroniques |
|
DFR0672 Fiches technique(PDF) 9 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0672 Fiches technique(HTML) 9 Page - DFROBOT |
|
9 / 26 page ![]() The current CPU tempterature will be printed on the Raspberry Pi terminal, and the fan speed increases as the temperature goes up. • Codes Analysis 1. First, import file control library and I2C library. The path to check Raspberry Pi's CPU temperature is defined as TEMP_PATH. 2. Define parameters related to CPU temperature and I2C. 3. Open CPU temperature file circularly and save fd_Temp (In Linux, everything is a file). If it fails to open, return - 1. Next, read the temperature and save it in buf. also returns - 1 when failed. After the temperature reading is saved to buf successfully, it need to be divided by 1000 because the value is relatively large, then the current temperature can be obtained in centigrade, and save it to temp. Run the close() function to close the file manually after reading the file. |
|
Lien URL |
| ALLDATASHEET vous a-t-il été utile ? [ DONATE ] |
À propos de Alldatasheet | Publicité | Contactez-nous | Politique de confidentialité | Lien vers la fiche technique | Echange de liens | Fabricants All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |