Skip to content

Commit f623aa4

Browse files
committed
binary files + updated readme
1 parent e5d6eeb commit f623aa4

File tree

4 files changed

+42
-9
lines changed

4 files changed

+42
-9
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
# 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 hard reset a computer with Raspberry Pi or other mini-computer from the GPIO pins
33
#### Still in progress
4-
![console](screenshot.png)
54

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+
![console](screenshot.png)
76

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.
118

129
### Logic
1310
* Ping miners at most every 30 minutes (the period is configurable).
1411
* 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)
1512

1613
### 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+
1816
![console](raspberrypi-5v-relay.jpeg)
19-
Soon binary files.
2017

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+
```
2232

2333
Configuration for this program is stored in file config.json .
2434
Example config.json:
@@ -33,6 +43,12 @@ Example config.json:
3343
```
3444

3545
### 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+
3652
If you are building on your Raspberry Pi, type `go build *.go` in the folder.
3753
If you are building on your workstation type `GOARM=6(or 7) GOARCH=arm GOOS=linux go build *.go`
3854
##### GOARM=6 (Raspberry Pi A, A+, B, B+, Zero) GOARM=7 (Raspberry Pi 2, 3)

bin/auto-hard-reset-arm6

2.8 MB
Binary file not shown.

bin/auto-hard-reset-arm7

2.8 MB
Binary file not shown.

bin/config.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"WaitSeconds": 1800,
3+
"Miners": [
4+
{ "Name": "machine 1", "Pin": "40", "Ip": "192.168.0.100", "Info": "R9 290's" },
5+
{ "Name": "machine 2", "Pin": "38", "Ip": "192.168.0.101", "Info": "RX480's" },
6+
{ "Name": "machine 3", "Pin": "37", "Ip": "192.168.0.102", "Info": "RX480's" },
7+
{ "Name": "machine 4", "Pin": "36", "Ip": "192.168.0.103", "Info": "RX480's" },
8+
{ "Name": "machine 5", "Pin": "35", "Ip": "192.168.0.104", "Info": "RX480's" },
9+
{ "Name": "machine 6", "Pin": "33", "Ip": "192.168.0.105", "Info": "RX480's" },
10+
{ "Name": "machine 7", "Pin": "32", "Ip": "192.168.0.106", "Info": "RX480's" },
11+
{ "Name": "machine 8", "Pin": "31", "Ip": "192.168.0.107", "Info": "RX480's" },
12+
{ "Name": "machine 9", "Pin": "29", "Ip": "192.168.0.108", "Info": "RX480's" },
13+
{ "Name": "machine 10", "Pin": "22", "Ip": "192.168.0.109", "Info": "RX480's" },
14+
{ "Name": "machine 11", "Pin": "18", "Ip": "192.168.0.110", "Info": "RX480's" },
15+
{ "Name": "machine 12", "Pin": "16", "Ip": "192.168.0.111", "Info": "RX480's" }
16+
]
17+
}

0 commit comments

Comments
 (0)