Skip to content

Commit e3f5af4

Browse files
Update README.md
1 parent 3c03466 commit e3f5af4

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Miscellaneous scripts for my [Turing Pi](https://turingpi.com/) setup. Turn on a
33

44
<p align="center"><img src="https://github.com/nicholaswilde/turing-pi-scripts/raw/develop/images/turing-pi.jpg" width="600"></p>
55

6-
| :warning: **WARNING**:The register which controls the power to each board is backed by an EEPROM. Don't set all bits in there to 0, otherwise you won't be able to boot and correct it. A fix is to set register 0xF4 to 1 which would send the writes to the shadow SRAM, instead of the EEPROM. A fix for this is to connect an external raspberry pi to the I2C External pins and reset the registers. |
7-
| :-- |
6+
> :warning: **WARNING**:The register which controls the power to each board is backed by an EEPROM. Don't set all bits in there to 0, otherwise you won't be able to boot and correct it. A fix is to set register 0xF4 to 1 which would send the writes to the shadow SRAM, instead of the EEPROM. A fix for this is to connect an external raspberry pi to the I2C External pins and reset the registers. |
87
98
| Script | Function |
109
| --- | --- |
@@ -116,7 +115,7 @@ WorkingDirectory=/home/pirate/git/turing-pi-scripts/
116115
```bash
117116
# Copy the file
118117
sudo cp turn-on-nodes.service /etc/systemd/system/turn-on-nodes.service
119-
sudo cp turn-on-nodes.service /etc/systemd/system/listen-for-shutdown.service
118+
sudo cp listen-for-shutdown.service /etc/systemd/system/listen-for-shutdown.service
120119

121120
# Change the permission of the files
122121
$ sudo chmod 664 /etc/systemd/system/turn-on-nodes.service
@@ -127,6 +126,30 @@ $ sudo systemctl daemon-reload
127126
$ sudo systemctl enable /etc/systemd/system/turn-on-nodes.service
128127
$ sudo systemctl enable /etc/systemd/system/listen-for-shutdown.service
129128
```
129+
## Test
130+
On the master node:
131+
```bash
132+
# Initial Conditions: All nodes are on and in the ~/git/turing-pi-scripts/ directory.
133+
$ sudo ./turn-off-nodes.sh
134+
# All worker nodes should be off (activity lights should stop blinking).
135+
# Turn on the worker nodes again.
136+
$ sudo ./turn-on-nodes.sh
137+
# Turn off the worker nodes again.
138+
$ sudo ./turn-off-nodes.sh
139+
# Shutdown the master node.
140+
$ sudo shutdown now
141+
# Master node should shut down after a while.
142+
# Press the power button.
143+
# The power LED should come on.
144+
# The master node should power on.
145+
# The worker nodes should also power on (activity lights start blinking).
146+
# Hold the power button for two seconds.
147+
# The power LED should blink a few times.
148+
# Worker nodes should power down.
149+
# Master node should power down after awhile.
150+
# The power LED should turn off.
151+
# Press the power button to turn on all the nodes.
152+
```
130153

131154
## Usage
132155
```bash
@@ -156,7 +179,6 @@ $ sudo listen-for-shutdown
156179
## Todo
157180
- [ ] Verify that the node register values are valid.
158181
- [ ] Create install and uninstall scripts and/or deb package.
159-
- [ ] Move `nodes.cfg` to `/etc/turing-pi-scripts/` directory.
160182

161183
## Credit
162184
`listen-for-shutdown` is based off of [lihak's](https://github.com/lihak) [rpi-power-button](https://github.com/lihak/rpi-power-button)

0 commit comments

Comments
 (0)