On this post I will show you how to use an old Raspberry Pi B+ (yes, model 1) to gain some virtual money (crypto currency)
First off, don’t think i will be using the raspberry Pi to mine, that’s just dumb, what you must know is that some cryptocurrencies work on a PoW (Proof-of-work) way, where anyone can “mine” coins with their CPU/GPU or Asic devices, and some coins also work or just work on a PoS (Proof-of-Stake) way.
The way to get coins with a PoS crypto coin is to get coins on your wallet, and let them stay there, without sellling or transfering to anyone, and make sure you activate “Staking” on the wallet, after a while you will generate coins with your wallet, by not touching your coins for some time.
So here’s how I’m runnning it and you can run as well:
Grab your old Raspberry Pi, I’m using Xbian on it, since this is a slow equipment we will overclock the CPU and add some Swap so we can even compile the wallet.
To overclock the CPU simply go to /boot/config.txt and replace or add these instructions:
This will increase your CPU clock speed from the stock 700MHz to 1040MHz
Reboot the Pi for the changes to take effect.
You can confirm your CPU top speed with this command:
lscpu | grep “MHz”
I’ve also connected a USB fan that I had laying around to help cooldown the CPU since it would be running at 100% for many hours, this caused CPU temperature to never reach 40º, even after several hours toasting at 100%.
Now let’s create a swap file so we can have enough memory to compile the wallet, I used an USB PEN to act as swap space, I recomend you do this, instead of using the SDCard for it.
Generate the swap file with this command:
dd if=/dev/zero of=/media/DISK_IMG/swap.file bs=1M count=2048
(This will generate a 2GB Swap file, it will take a long time to create)
chmod 600 /media/DISK_IMG/swap.file
Activate the Swap:
You can confirm you now have plenty of swap space with the “free” command:
I will be using the [DMD] Diamond coin wallet for this, since I own a decent amount of coins, you can download the wallet here:
Let’s now compile the wallet, take in consideration that the raspberry Pi, even though it’s overclocked, is still very slow compared to a normal PC
First install necessary dependencies:
apt-get install git automake build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libminiupnpc-dev
Then navigate to the folder where the wallet files are and execute the following commands:
this part will take a very long time, and I even had a few Raspberry hang ups, if it hangs you can restart the Raspberry and run the “make” command again, it will resume from where it was.
To help reduce the number of hangs, I’ve reduce the compile processes priority with the “renice” command, I’ve setup a small script that ran as a cronjob and reduced process priority for user DMD, the one compiling the wallet, you can take a look at the script:
Expect a all day just to set everything up (yes, raspberrys are slow ).
Once the wallet is compiled we will create a config file for it, create this file on your corresponding location:
On the file enter this so the wallet will stake:
Save the config and start your wallet.
The wallet executable file is located on the “src” folder, inside the folder of the wallet.
To start the wallet execute the comand:
The daemon parameter will run the wallet as a service on the background.
And there you go, you are now making coins.
You can check your balance with the command diamond-cli get balance or diamond-cli getinfo.