Skip to content

calvernaz/rak811

Repository files navigation

rak811

RAK811 Golang Library for use with LoRa pHAT & MicroBIT Node

Build

Example

func main() {
	cfg := &serial.Config{
		Name:        "/dev/ttyAMA0",
	}

	lora, err := rak811.New(cfg)
	if err != nil {
		log.Fatal("failed to create rak811 instance: ", err)
	}

	resp, err := lora.HardReset()
	if err != nil {
		log.Fatal("failed to reset: ", err)
	}

	resp, err = lora.Version()
	if err != nil {
		log.Fatal("failed to get version: ", err)
	}

	fmt.Println(resp)
}

To run the example, use sudo:

sudo go run main.go

You can find a more complete example and usage in resources.

Resources

Wiki

RPi project example

About

RAK811 Golang Library for use with LoRa pHAT & MicroBIT Node

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages