Bitcoin Mining using Raspberry Pi

Want to mine some bitcoins? Want to earn for free? Have a pi not being used?

Then lets mine some bitcoins!

Step 1: What is BitCoin?

If you don’t know already, Bitcoin is a virtual currency set up in 2009. Bitcoin has grown in reputation over the past few years becoming a very popular as a method to pay for services over the internet. The value has rocketed recently thanks to the huge coverage in the media, for both positive and negative reasons.

There are two ways to get Bitcoin:

-Buying them from an exchange, which is the process of converting local currency to Bitcoin.

-Mining them. Mining is the process of verifying transactions in the blockchain.

As the whole of the Bitcoin system is decentralised, every transaction is publically viewable within what is called the blockchain. This blockchain contains every bitcoin exchanged between users so, as there is no central server, it has to be self governed. This is the job of the miners.Bitcoin Mining using Raspberry Pi

Step 2: Requirements

In order to mine Bitcoin, you will

A pool account

Bitcoin Wallet

Raspberry Pi

Raspbian image SD card

USB Bitcoin miner

Step 3: Creating an Account

There are two things you need to do:

Download a bitcoin wallet

Create a pool account

Set up paymentSet up workers

Download a Bitcoin Wallet

A wallet is a program that sits on your computer and gives you a wallet address, this is a unique string of numbers and letters that you will use to receive bitcoins. Download the client for your computer from https://bitcoin.org/en/download

After installation, you will have to save a file called wallet.dat, keep this file safe, as this contains your unique wallet address within it, including all bitcoins that you will gain. If you lose this file, you cannot recover any bitcoins it contained.

Create a Pool Account Once you have a wallet address, create a pool account. A pool is a huge collection of other people working towards gaining bitcoins. Due to the complexity of mining a bitcoin, it has become unrealistic to solo mine–the act of processing millions of numbers to solve the block problem. Working as a group, or pool, lets everyone have a chance of earning some Bitcoin. There are many pools around, in this tutorial I’ll be using one called Slush’s pool: https://bitcoin.org/en/download

Set Up Payment

Once you have created a pool account, you'll need to enter your unique wallet address into the Bitcoin payout address.

Create Worker Account

Next step is to create a worker login account. Within your pool account you have the ability to create something called a worker for each of your bitcoin miners, so you're able to monitor them all separately just in case one should fail.

Each worker has its own login name and password. Whilst you are on My Accountclick Register New Worker and give it a name, for example; worker, and a password. Now you're ready to set your Raspberry Pi mining for Bitcoin.

Step 4: Setting Up the Raspberry Pi

Start with a fresh Raspbian install, if you don’t know who to do this, read the tutorial How to Install NOOBS on a Raspberry Pi With a Mac.

If you plan on running more than one Bitcoin miner at the same time, it is best to use a powered USB hub. Take into account the power rating as mining will need a lot of power, as much as one mp per miner.

With your USB miner attached to your Raspberry Pi, let’s get everything installed.

Step 5: Installing Required libraries

The miner to be installed comes as source files, which means that the program must be compiled into a binary before it can be run. To make a program, in this case BFGMiner, many dependencies are required.

Dependencies are additional software, or libraries the program needs in order to compile properly, as it has been developed using them to make the software more efficient. Hopefully you will be seeing the Raspbian desktop, so double click on LXTerminaland type in the following:

1) sudo apt-get update

2) sudo apt-get install autoconf autogen libtool uthash-dev libjansson-dev libcurl4-openssl-dev libusb-dev libncurses-dev git-core –y

This process will take a few minutes to complete.Bitcoin Mining using Raspberry Pi Schematic

Step 6: Installing BFGMiner

Once all the dependencies have been installed, now it is time to download and install BFGMiner, so type the following into LXTerminal. It’s normal for these to take a few minutes to complete so some patience is needed.

git clone https://github.com/luke-jr/bfgminer.git
cd bfgminer

./autogen.sh

./configure

make

You will be greeted with a screen that looks similar to the following:

 

 

For more detail: Bitcoin Mining using Raspberry Pi


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top