Logo
Published on

CPU Mining Altcoins (TurtleCoin TRTL) on an SBC

SBC Mining alternate cryptocurrencies (altcoins) such as TurtleCoin on a Raspberry Pi

Authors
  • avatar
    Name
    Mike Tsamis
    Twitter

With cryptocurrency being a very hot topic lately, I wanted my next side project to explore how to mine altcoins in an affordable, practical way without investing in a mining rig or specialized hardware. This tutorial is strictly for educational purposes. Do not expect to make profit from this due to the very low hashrate of SBCs in addition to the electrical cost of powering an SBC for mining 24/7.

Materials:

  1. Raspberry Pi Zero W
  2. Power adapter
  3. MicroSD Card with at least 8gb of space
  4. Mini HDMI to HDMI Cable
  5. A keyboard to connect to the Raspberry Pi Zero W
  6. A second computer where we will set up the blockchain and altcoin wallet.

Step 1: Identifying a Coin to Mine

Since we are using a very cheap SBC for mining, there are only specific coins we can choose to mine. For instance, we will not be able to mine Bitcoin, Ethereum or LiteCoin because they depend on heavily specialized, application-specific integrated circuits (ASICs) or expensive GPUs. Therefore, we will stick with altcoins that can be mined via the CPU. Here is a list of altcoins that can be mined with a CPU.

However, in this project, I've chosen to mine a very new altcoin that was forked from ByteCoin known as TurtleCoin. I first heard of TurtleCoin while listening to the 3rd episode of a cryptocurrency podcast called Block Zero by Kevin Rose, a venture capitalist for True Ventures who was a general partner at Google Ventures and is quite invested and involved in the cryptocurrency community. In this episode, he interviewed the founder of TurtleCoin who calls himself RockSteady. I really liked what I heard and joined their Discord Channel and was very impressed with how friendly, generous and helpful the community is. It's currently a very new and upcoming coin that is not on any exchanges yet. However, it has gained popularity and that I feel it has potential to grow into something bigger.

Step 2: Setting Up the Blockchain and Wallet on Your PC

You'll need to install the latest release of TurtleCoin which you can get here. This page has instructions on how to compile TurtleCoin in both Ubuntu and Apple operating systems. A guide for Windows can be found here. Once you've compiled the project, run "TurtleCoind" which will start syncing your blockchain. This will take about 10-15 minutes. Once you see a message indicating that you're synced, run "SimpleWallet" where any coins you mine will be stored. Once running, type "G" and press enter to generate a new wallet. You will then have to give it a username and password. To see your wallet's address, type the command "address" and you can copy and paste your wallet address in a text file. You'll need this address later so that you can store the coins you mine here.

Step 3: SBC Mining TurtleCoins on the Raspberry Pi

Download the latest non-desktop version of Raspbian. Follow their installation guide on how to write the OS image onto the MicroSD card. Once done, plug in the MicroSD card, your keyboard, monitor, and power adapter into the Raspberry Pi which will automatically boot the OS. Once you've connected your raspberry pi to the internet, run the following two commands to obtain and install the latest packages:

sudo apt-get update && sudo apt-get upgrade

This may take a few minutes. Next, we'll have to install some required tools to compile and run the miner. Enter this command:

apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++

Next, we need to obtain a CPU miner. I've chosen to use cpuminer-multi since it can be used to mine many different cryptocurrencies using various algorithms.

git clone https://github.com/tpruvot/cpuminer-multi

Let's now move to that directory and install the miner:

cd cpuminer-multi
./configure --disable-assembly CFLAGS="-Ofast -march=native" --with-crypto --with-curl
sudo make install

Finally, we can run the miner with the following parameters:

cpuminer -a cryptonight -o stratum+tcp:[YOUR POOL HERE] -u [YOUR WALLET ADDRESS HERE] -p x

You'll need to select a pool to participate in for the first "-o" parameter. This TurtleCoin Wiki has a list of active pools toward the bottom. Pick one that is closest to your location. In my case, since I'm based in NY, I chose "ny.minetrtl.us:3333" which I entered as the "-o" parameter. For the "-u" parameter, you simply paste your wallet address that you copied over from Step 2.

After entering this command, the miner will start scanning your hardware and begin to mine. You should see an output similar to this:

1 CPU Mining Altcoins on an SBC

To view your pool/mining stats, pending balance, payouts and more, go to the URL of your pool without the port number and enter your wallet's address at the bottom of the page.

2 CPU Mining Altcoins on an SBC

Conclusion

With my Raspberry Pi Zero W running for a few hours, I had a very low average hashrate of 1.48 H/sec which could currently generate around 2-4 TurtleCoins per day. This is a huge contrast from my gaming PC which has an average hashrate of about 550 H/sec which could generate around 1,000 coins per day. However, there are a lot of variables that cause this number to fluctuate and this coin has a HUGE total supply which the founder explains why in this article. Overall, I've found this to be a fun coin to mine despite not having any real value currently. The TurtleCoin community provided me with great insight on how mining works and the lifecycle of an altcoin from inception to development.

If you enjoyed this post and have a TurtleCoin wallet, you can donate to my address here ;)

TRTLv23Fa8TfDErxVHjSnQXc8dwAHBuvGcy21DcC7DAFGMxvYy8PTajXqcjDxosuRd1GJCd5GbYCnhQCBJbE7ur4LMnf75t3v2Y

Happy SBC Mining!

Update (1/28/18)

I made some slight modifications to this tutorial and submitted it to TurtleCoin's official github documentation repo. You can find my guide on mining turtlecoin with an SBC here.

Related Articles