Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buildaskyminer.com website - DIY Skyminer Guides
#1
I made a website to help promote the Skycoin Project. It's https://buildaskyminer.com


[Image: BASwebsite_Home.jpg]


I've linked to as many of the official Skycoin resources as I could. I also put together a set of really robust--and hopefully user friendly--DIY Skyminer guides using Raspberry Pi 3 Model B/B+ boards (thanks skyguy, BigOokie, adhaelon, SkyVinnie, asxtree, and others for your posts and guides--they all helped!). I vow to keep on top of updates as they're required, and I hope to add additional guides for other boards (like the Orange Pi).

I truly could not have made my first Skyminer or my guides without the help of this group, and I hope that through the website I can help others find, join in, and help grow the Skycoin community.

I'd like this thread to be used to suggest improvements to the site, and if I did make mistakes, to let me know to fix them! I hope that when visitors see the site, they're reassured that the project is thriving and that Skycoin deserves a few minutes of their attention.

So, what do y'all think? What can I do better? 

Thanks everyone,
Matto

PS: If anyone uses these guides for their builds, I'd love to hear your feedback!
I started https://BuildaSkyminer.com to help promote Skycoin and the Skywire project. I'm @Matto7089 on Telegram and Discord.
[-] The following 2 users say Thank You to Matto for this post:
  • I Am You, skyguy
Reply
#2
I like, Well done man!
[-] The following 1 user says Thank You to I Am You for this post:
  • Matto
Reply
#3
(06-24-2018, 08:10 PM)I Am You Wrote: I like, Well done man!

Thanks! I just added another section on adding a physical power button to switch off the Rpi. The button also wakes it up. 

[Image: powerswitch.jpg]

The button could be programmed to run a script to shut down all nodes too. Adding it to the Rpi is pretty straightforward, you use a computer power switch (2-pin ATX style), plug it into GPIO3 and ground, then write two scripts to watch for the press.

For the software side, I found this github, then found the guide on howchoo. The steps are simple enough. To start off, log into the node and enter the following command to create a new file to hold the python script:

sudo nano listen-for-shutdown.py

Paste into the file the following:

#!/usr/bin/env python
 
import RPi.GPIO as GPIO
import subprocess
 
GPIO.setmode(GPIO.BCM)
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.wait_for_edge(3, GPIO.FALLING)
 
subprocess.call(['shutdown', '-h', 'now'], shell=False)

Press “CTRL+X”, “Y”, “ENTER” to save the file and return to the command line.

Move the script and make it executable:

sudo mv listen-for-shutdown.py /usr/local/bin/
sudo chmod +x /usr/local/bin/listen-for-shutdown.py

Make a script to start/stop the python listening code:

sudo nano listen-for-shutdown.sh

Paste into the file the following:

#! /bin/sh
 
### BEGIN INIT INFO
# Provides: listen-for-shutdown.py
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
 
# If you want a command to always run, put it here
 
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting listen-for-shutdown.py"
/usr/local/bin/listen-for-shutdown.py &
;;
stop)
echo "Stopping listen-for-shutdown.py"
pkill -f /usr/local/bin/listen-for-shutdown.py
;;
*)
echo "Usage: /etc/init.d/listen-for-shutdown.sh {start|stop}"
exit 1
;;
esac
 
exit 0

Press “CTRL+X”, “Y”, “ENTER” to save the file and return to the command line.

Move the script and make it executable.

sudo mv listen-for-shutdown.sh /etc/init.d/
sudo chmod +x /etc/init.d/listen-for-shutdown.sh

Make it start at boot:

sudo update-rc.d listen-for-shutdown.sh defaults
sudo /etc/init.d/listen-for-shutdown.sh start

Now the node will listen for the button press before executing the shutdown command. Note that your SSH session will be closed, and after the green light finally turns off, you should wait another five seconds before unplugging the node.

Turn the node back on by pressing the button again. Using this format, you could program your node to execute a script at the press of a button!
I started https://BuildaSkyminer.com to help promote Skycoin and the Skywire project. I'm @Matto7089 on Telegram and Discord.
[-] The following 1 user says Thank You to Matto for this post:
  • I Am You
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)