boom
This commit is contained in:
1 parent
86306269da
commit
cbb4df00de
4 files changed
+24
-3
No files matched your search
@@ -13,7 +13,7 @@
|
|||||||
pname = "go-orange";
|
pname = "go-orange";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = null;
|
vendorHash = "sha256-gDM2R78BqQmNK8h2f5pLSA8ddbjMwMpjHPPTMnKmbwU=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
packages = { default = default; };
|
packages = { default = default; };
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
module go-orange
|
module go-orange
|
||||||
|
|
||||||
go 1.22
|
go 1.22
|
||||||
|
|
||||||
|
require (
|
||||||
|
periph.io/x/conn/v3 v3.7.0 // indirect
|
||||||
|
periph.io/x/host/v3 v3.8.2 // indirect
|
||||||
|
)
|
||||||
@@ -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=
|
||||||
@@ -1,8 +1,20 @@
|
|||||||
package main
|
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() {
|
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")
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user