tidy up dependencies
support the button
a really dumb demo app for the fan
A go library for interfacing with the Argon Fan Pi HAT
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
}
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.
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.