Skip to content

Go package for getting hardware relevant information during runtime on Raspberry Pi's

License

Notifications You must be signed in to change notification settings

DerLukas15/rpihardware

Repository files navigation

rpihardware GoDoc

Package for determining the used Raspberry Pi hardware with corresponding information during runtime.

About

This package determines the running Raspberry Pi hardware by checking either /proc/cpuinfo or /proc/device-tree/system/linux,revision.

It returns information about:

  • hardware version
  • Pi model type
  • oscillator frequency
  • base address for 'physical memory'
  • description of the model

The list is inspired by github.com/jgarff/rpi_ws281x.

Installation

go get github.com/DerLukas15/rpihardware

Usage

Import the package

import ("github.com/DerLukas15/rpihardware")

Get the struct containing the information about the hardware:

curHardware, err := rpihardware.Check()

License

MIT, see LICENSE

About

Go package for getting hardware relevant information during runtime on Raspberry Pi's

Resources

License

Stars

Watchers

Forks

Languages