2022-04-02 18:14:21 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
const wiegand_a = 17
|
|
|
|
const wiegand_b = 18
|
2022-04-03 13:50:21 +00:00
|
|
|
const wiegand_bit_timeout = time.Millisecond * 8
|
2022-04-02 18:14:21 +00:00
|
|
|
const solenoid = 21
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
2022-04-03 16:27:16 +00:00
|
|
|
wiegand := WiegandSetup(wiegand_a, wiegand_b, wiegand_bit_timeout, solenoid)
|
2022-04-02 18:14:21 +00:00
|
|
|
|
2022-04-03 13:50:21 +00:00
|
|
|
//openDoor(solenoid_line)
|
2022-04-03 16:27:16 +00:00
|
|
|
go wiegand.cardRunner()
|
2022-04-03 13:50:21 +00:00
|
|
|
fmt.Printf("Sleeping\n")
|
2022-04-02 18:14:21 +00:00
|
|
|
|
2022-04-03 13:50:21 +00:00
|
|
|
for {
|
|
|
|
time.Sleep(time.Second)
|
|
|
|
fmt.Printf(".")
|
|
|
|
}
|
2022-04-02 18:14:21 +00:00
|
|
|
}
|