You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,34 @@
1
1
# RPi miner auto-hard-reset
2
-
Simple Go program for auto-hard-reset computer with Raspberry Pi or other mini-computer
2
+
Simple Go program for automatically hardreset a computer with Raspberry Pi or other mini-computer from the GPIO pins
3
3
#### Still in progress
4
-

5
4
6
-
First commit is the prototype. I'm using 5V relay and checking the miners with ping command. If there is no answer - hard-reset with the GPIO.
5
+

7
6
8
-
### Requirements
9
-
* Raspberry Pi
10
-
* Golang >= 1.8.0
7
+
I'm using 5V relay and checking the miners with ping command. If there is no answer - hard-reset with the GPIO pins.
11
8
12
9
### Logic
13
10
* Ping miners at most every 30 minutes (the period is configurable).
14
11
* if offline > send signal for 5 sec (turn off pc), pause 5 sec(wait) and send signal again for 0.108 second (turn on pc)
15
12
16
13
### How-to
17
-
I'm using Raspberry Pi with 5V relay. Soon I will add detailed instruction but this is the basics.
14
+
I'm using Raspberry Pi with 5V relay. Soon I will add detailed instruction but you can find a lot of information how to use 5v relay with Raspberry Pi. This is the basics.
15
+
18
16

19
-
Soon binary files.
20
17
21
-
Use `go get -u -v github.com/kasmetski/auto-hard-reset` instead of `git clone`
18
+
Depending of your Raspberry Pi version, download one of the archives
19
+
`arm6` - (Raspberry Pi A, A+, B, B+, Zero)
20
+
`arm7` - (Raspberry Pi 2, 3)
21
+
22
+
Open the folder from the console and type (example with arm7)
23
+
24
+
```
25
+
tar -xvzf auto-hard-reset-arm7.tar.gz
26
+
chmod +x auto-hard-reset-arm7
27
+
```
28
+
and after you configure the `config.json`
29
+
```
30
+
./auto-hard-reset-arm7
31
+
```
22
32
23
33
Configuration for this program is stored in file config.json .
24
34
Example config.json:
@@ -33,6 +43,12 @@ Example config.json:
33
43
```
34
44
35
45
### Build
46
+
##### Requirements
47
+
* Raspberry Pi
48
+
* Golang >= 1.8.0
49
+
50
+
Type `go get -u -v github.com/kasmetski/auto-hard-reset`
51
+
36
52
If you are building on your Raspberry Pi, type `go build *.go` in the folder.
37
53
If you are building on your workstation type `GOARM=6(or 7) GOARCH=arm GOOS=linux go build *.go`
38
54
##### GOARM=6 (Raspberry Pi A, A+, B, B+, Zero) GOARM=7 (Raspberry Pi 2, 3)
0 commit comments