Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jig/raspi-cputemp
https://github.com/jig/raspi-cputemp
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jig/raspi-cputemp
- Owner: jig
- Created: 2023-08-20T12:47:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-20T16:07:17.000Z (about 1 year ago)
- Last Synced: 2024-04-14T15:51:31.387Z (7 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# raspi-cputemp
Minimal package to read ARM CPU temperature of the Raspberry Pi 4.
Idea from https://github.com/fgrosse/pi-temp.
```go
package mainimport (
"log"cputemp "github.com/jig/raspi-cputemp"
)func main() {
temp, err := cputemp.Get()
if err != nil {
log.Fatal(err)
}
log.Printf("CPU temp is %.3f°C", temp)
}
```# Command line
```bash
cd cmd/temp
go build
go installtemp
```Example output:
```bash
2023/08/20 15:08:38 CPU temp is 84.237°C
```A bit too high temperature by the way.