This commit is contained in:
didier committed 2024-07-26 12:16:46 -04:00
1 parent 86306269da
commit cbb4df00de
4 files changed
+24 -3

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@
pname = "go-orange";
version = "0.0.1";
src = ./.;
vendorHash = null;
vendorHash = "sha256-gDM2R78BqQmNK8h2f5pLSA8ddbjMwMpjHPPTMnKmbwU=";
};
in {
packages = { default = default; };
+5
View File
@@ -1,3 +1,8 @@
module go-orange
go 1.22
require (
periph.io/x/conn/v3 v3.7.0 // indirect
periph.io/x/host/v3 v3.8.2 // indirect
)
+4
View File
@@ -0,0 +1,4 @@
periph.io/x/conn/v3 v3.7.0 h1:f1EXLn4pkf7AEWwkol2gilCNZ0ElY+bxS4WE2PQXfrA=
periph.io/x/conn/v3 v3.7.0/go.mod h1:ypY7UVxgDbP9PJGwFSVelRRagxyXYfttVh7hJZUHEhg=
periph.io/x/host/v3 v3.8.2 h1:ayKUDzgUCN0g8+/xM9GTkWaOBhSLVcVHGTfjAOi8OsQ=
periph.io/x/host/v3 v3.8.2/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4=
+14 -2
View File
@@ -1,8 +1,20 @@
package main
import "fmt"
import (
"fmt"
"periph.io/x/conn/v3/gpio"
"periph.io/x/host/v3"
"periph.io/x/host/v3/orangepi"
"time"
)
func main() {
fmt.Println("Hello world")
host.Init()
t := time.NewTicker(500 * time.Millisecond)
for l := gpio.Low; ; l = !l {
orangepi.PA1_8.Out(l)
<-t.C
fmt.Println("tick")
}
}