~sungo/argon

A go library for interfacing with the Argon Fan HAT
18a98e1a — sungo a month ago
tidy up dependencies
23dc0c16 — sungo a month ago
support the button
7b72493b — sungo a month ago
a really dumb demo app for the fan

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~sungo/argon
read/write
git@git.sr.ht:~sungo/argon

You can also use your local clone with git send-email.

#Wat

A go library for interfacing with the Argon Fan Pi HAT

#Example

import (
	"git.sungo.io/sungo/argon"
)

const (
	Bus     = 1
	Address = 0x1a
)

func main() {

	fan, err := argon.NewFan(Address, Bus)
	if err != nil {
		panic(err)
	}
	defer fan.SafeClose() // Sets the fan to 50%
	fan.SetSpeed(100) // percent
}

#Support / Contributing

This is a personal side project and will get about that much attention, maybe less. If you have patches, feel free to contact me (see https://sungo.io) but I make no promise as to when or if I'll respond. But, feel free to fork the code, respecting the license, and have your way with it.

#Licensing

Licensed under 0BSD

Software originally developed by sungo (https://sungo.io)

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.