Bitcoin is a type of virtual currency first issued in 2009. Over the past few years, Bitcoin has become one of the popular payment methods for services over the Internet. Mining bitcoin with Raspberry Pi will guide you on how to use this compact device instead of having to install bulky computers to mine bitcoin.
Understanding Bitcoin
For more details about bitcoin, readers can refer to the article 'What is Bitcoin? Can you earn Bitcoin on your own?' by Mytour.
There are 2 ways to get bitcoin:
- Buy bitcoin from transactions, which is the process of converting local currency to bitcoin.
- Mine bitcoin. Mining bitcoin is the process of verifying transactions in the blockchain.
Because the entire bitcoin system is decentralized, all transactions are public within a scope called the blockchain. This blockchain contains bitcoins that users exchange with each other. Since there is no central server, the blockchain must be self-managed, and that is the job of miners.
Requirements
To mine Bitcoin with Raspberry Pi, you will need:
- An account on a pool.
- Bitcoin wallet (bitcoin wallet).
- Raspberry Pi.
- SD card.
- USB Bitcoin miner.
Create an account
Below are the things you need to do:
- Download a bitcoin wallet (bitcoin wallet).
- Create an account on a pool.
- Setup payment.
- Create a Worker account.
Download Bitcoin Core wallet
The Bitcoin Core wallet is a program on your computer that gives you a bitcoin wallet address. This address is a unique string of numbers and letters that you use to receive bitcoin. Download the client for your computer here: Download Bitcoin Core
After installation, your next task is to save a file named wallet.dat to a safe place, as this file contains your bitcoin wallet address - containing all the bitcoins you have acquired. If you lose this file, you cannot recover any bitcoins in it.
Create an account on Pool
Once you have a bitcoin wallet address, the next step is to create an account on a pool (mining pool). A mining pool is where miners gather to mine bitcoin. Because mining bitcoin is complex, it will not become a reality for a single mine - processing millions of numbers to process blocks.
Working in groups, or pools (mining pools), allows everyone to have the opportunity to earn more bitcoin. There are many bitcoin mining pools, in this article Mytour will guide you on how to mine bitcoin on a bitcoin mine called Slush.
Setup payment
After creating an account on a pool (mining pool), you will need to enter your bitcoin wallet address into the Bitcoin payment address.
Create a Worker account (miner)
The next step is to create a worker login account (account for bitcoin miners). In your pool account (mining pool), you have the ability to create another account called a worker account for each bitcoin miner using a Raspberry Pi, so you can track these accounts separately, unless an account fails.
Each miner has their own login name and password. On the My Accountclick Register New Worker window, you can set a name and password for each miner.
Now move on to the next step, setting up Raspberry Pi for bitcoin mining.
Setting up Bitcoin mining with Raspberry Pi
To start the process by installing a new Raspbian. If you don't know how to install Raspbian, you can search for installation steps online and follow them.
If you intend to use more than one bitcoin miner at the same time, it is best to use a supported USB port. Consider power evaluation as bitcoin mining will consume a large amount of energy, one mp/miner.
With the USB miner attached to Raspberry Pi, you allow everything to be installed.
Installing mandatory libraries
Miners are installed as source files, meaning the program must be compiled into a binary before it can be executed. Creating a program, in this case BFGMiner, requires several requirements.
These requirements include additional software, or libraries that programs require to compile correctly, as the program is developed using libraries to make the software more efficient.
Double-click LXTerminaland and enter the following commands:
sudo apt-get update
sudo apt-get install autoconf autogen libtool uthash-dev libjansson-dev libcurl4-openssl-dev libusb-dev libncurses-dev git-core -y
The process will take a few minutes to complete.
Install BFGMiner
After completing the installation of all the requirements, the next step now is to download and install BFGMiner. Enter the following commands into LXTerminal:
git clone https://github.com/luke-jr/bfgminer.git
cd bfgminer
./autogen.sh
./configure
make
Quá trình sẽ mất một vài phút, do đó bạn cần kiên nhẫn chờ đợi.
Màn hình của bạn sẽ giống như hình dưới đây:
Bắt đầu đào Bitcoin bằng Raspberry Pi
Bây giờ lúc bắt đầu đào bitcoin. Để đào bitcoin, nếu đang sử dụng mỏ Slush được cung cấp ở trên, bạn sử dụng lệnh dưới đây:
./bfgminer -o stratum.bitcoin.cz:3333 -O username.worker:password -S all
In the command above, the username consists of two parts, the username you use to log into the mining pool and the worker is the name of the miner you set when registering. Finally, the password is set when you create the miner.
Current mining speed is usually measured in megahashes or gigahashes. The number of hashes per second can be calculated more precisely.
Hashing is the algorithm that converts numbers and letters into an irreversible set of characters. So, a miner is used to process millions of numbers, combined with hashes to guess the original number. Other hashes may be processed faster to solve the problem.
Mined Block: Each block mined in a bitcoin mine is the result of a miner's work.
Details about the mined block and continuously updated block information assigned to miners in the bitcoin mine. This is the operational record of the miner and basic information about the bitcoin mine, such as update notifications and when new blocks are found.
Following the steps above to mine bitcoin with Raspberry Pi and your bitcoin miner works more efficiently, a Raspberry Pi uses only 4W of energy and a miner is 2.5W. Bitcoin mining is done on computers that consume over 700W for the same process to save on the hardware costs we're using.
All you need to do now is sit back and watch the money slowly increase. It's important to understand that the value of Bitcoin fluctuates greatly, it's very volatile, so when investing you need to calculate your risk tolerance.
Additionally, you can use an LCD screen, connect multiple Raspberry Pi for faster and better performance.
Above is how to mine Bitcoin with Raspberry Pi that Mytour has just introduced to you. If you have any questions or want Mytour to help answer, you can leave your comments in the comment section below the article, you can follow the complete guide to mining bitcoin here to learn all the secrets to becoming a professional bitcoin miner.
