Bitcoin raspberry pi mining: Crypto Mining With Raspberry Pi: A Guide

Crypto Mining With Raspberry Pi: A Guide

The Raspberry Pi is a great hobby mini-computer, but what if we can also use it to make money?

The rise of Bitcoin has created an interest in cryptocurrency mining. If you have a spare Raspberry Pi lying around, you can put it to work mining for digital currency.

5 Steps to Mining Crypto With Raspberry Pi

  1. Install an Ubuntu server on your Raspberry Pi to start mining.
  2. Select the cryptocurrency you want to mine.
  3. Choose a wallet for your cryptocurrency.
  4. Execute the necessary code to run the miner.
  5. Track your progress.

I used Ubuntu server 20.04.3 long-term support (LTS), which supports Raspberry Pi 3, 4 and 400 on the 64-bit version, and an old Raspberry Pi 3 Model B revision 1.2 that I had lying around.

I am going to mine Duino-Coin, which is a coin that can be mined with an array of technologies, including Arduinos ESP8266/32 boards, Raspberry Pis and computers, as well asWi-Fi routers, smart TVs, smartphones, smartwatches, single-board computers (SBCs), microcontroller units (MCUs) and graphics processing units (GPUs).

 

How to Set Up Your Raspberry Pi to Crypto Mine

Installing Ubuntu on the Raspberry Pi is a very straightforward process. You can find detailed documentation on the Ubuntu website.

After the installation and boot of Raspberry Pi, we can log in with secure shell protocol (SSH) and should be presented with the Ubuntu server start screen:

Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
* Documentation:  https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:        https://ubuntu.com/advantage
System information as of Mon Dec  6 13:23:09 UTC 2021
System load:  1.2                Temperature:           45.1 C
Usage of /:   13.8% of 13.93GB   Processes:             137
Memory usage: 28%                Users logged in:       0
Swap usage:   0%                 IPv4 address for eth0: xxxxxxxxx

We can even see the temperature of the Raspberry Pi. Mine seems to be at 45 degrees Celsius just after boot.

More on CryptoWhat Is Crypto Staking?

 

Set Up Your Cryptocurrency

To set up Duino-Coin, all you need to do is follow these commands. We start by installing all the dependencies:

# Update package repositories and install dependencies
$ sudo apt update
$ sudo apt install python3 python3-pip git python3-pil python3-pil.imagetk -y

Then we can clone the Duino-Coin repository:

# Clone Duino-Coin repository
$ git clone https://github.com/revoxhere/duino-coin 
# Install Python dependencies for Duino-Coin
$ cd duino-coin
$ python3 -m pip install -r requirements.txt

We also need to generate a wallet where our mining profits are going to be added. Duino-Coin has a few wallet options, including a graphical user interface wallet, a command line interface wallet and a web wallet.

I chose the web wallet because it has additional features, like the ability to view your miner stats and calculate estimated profits.

Create a new Wallet on Duino-Coin Web Wallet. | Screenshot: Nuno Bispo

 

Start Crypto Mining With Raspberry Pi

To run the miner, we need to execute the following command:

# Run Miner (inside duino-coin directory)
$ python3 PC_Miner. py
Duino-Coin basic configuration tool
Edit Duino-Coin PC Miner 2.75/Miner_config.cfg file later if you want to change it.
Don't have an Duino-Coin account yet? Use Wallet to register on server.
Enter your Duino-Coin username: xxxxxxxxxx
Set mining intensity (1-100)% (recommended: 95): 95
Set mining threads (recommended for your system: 4): 4
1 - Low difficulty (for Raspberry Pis, older computers)
2 - Medium difficulty (for typical computers)
3 - Network difficulty (for powerful computers)
Select mining difficulty you want to use (1-3): 1
Do you want to add an identifier (name) to this rig? (y/N): y
Enter desired rig name: RPI3
Set developer donation level (0-5) (recommended: 1), this will not reduce your earnings: 1
Config saved! Launching the miner
‖ Official Duino-Coin © Python Miner (2.75) 2019-2021
 ‖ https://github.com/revoxhere/duino-coin
 ‖ CPU: 4x Cortex-A53
 ‖ Developer donation level: 1
 ‖ Algorithm: DUCO-S1 ⚙ Low diff
 ‖ Rig identifier: RPI3
 ‖ Have a peaceful afternoon, xxxxxxxxx!
16:12:51  net0  Searching for the fastest node to connect to
16:12:52  sys0  Thank You for being an awesome donator ❤️
                Your donation will help us maintain the server and allow further development
16:12:53  sys0  Mining thread #0 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53  sys1  Mining thread #1 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53  sys2  Mining thread #2 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53  sys3  Mining thread #3 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53  net0  MOTD: You are mining on Bilapool, have fun!
16:12:53  net0  Connected to master Duino-Coin server (v2. 7, 51.158.113.59:6043)
16:12:55  cpu0  ⛏ Accepted 1/1 (100%) ∙ 02.1s ∙ 54 kH/s ⚙ diff 2 k ∙ ping 18ms
16:12:55  cpu3  ⛏ Accepted 2/2 (100%) ∙ 02.4s ∙ 110 kH/s ⚙ diff 2 k ∙ ping 16ms
16:12:55  cpu1  ⛏ Accepted 3/3 (100%) ∙ 02.5s ∙ 165 kH/s ⚙ diff 2 k ∙ ping 18ms
16:12:56  cpu2  ⛏ Accepted 4/4 (100%) ∙ 03.1s ∙ 220 kH/s ⚙ diff 2 k ∙ ping 44ms
16:12:57  cpu1  ⛏ Accepted 5/5 (100%) ∙ 01.7s ∙ 222 kH/s ⚙ diff 5 k ∙ ping 21ms
16:13:00  cpu2  ⛏ Accepted 6/6 (100%) ∙ 04.3s ∙ 224 kH/s ⚙ diff 4 k ∙ ping 20ms
16:13:01  cpu0  ⛏ Accepted 7/7 (100%) ∙ 06.0s ∙ 225 kH/s ⚙ diff 5 k ∙ ping 26ms
16:13:02  cpu3  ⛏ Accepted 8/8 (100%) ∙ 06.9s ∙ 226 kH/s ⚙ diff 5 k ∙ ping 16ms
16:13:02  cpu1  ⛏ Accepted 9/9 (100%) ∙ 05.2s ∙ 224 kH/s ⚙ diff 5 k ∙ ping 20ms
16:13:05  cpu3  ⛏ Accepted 10/10 (100%) ∙ 03.2s ∙ 225 kH/s ⚙ diff 4 k ∙ ping 16ms
16:13:06  cpu2  ⛏ Accepted 11/11 (100%) ∙ 05.2s ∙ 224 kH/s ⚙ diff 4 k ∙ ping 20ms
16:13:06  cpu0  ⛏ Accepted 12/12 (100%) ∙ 05.3s ∙ 223 kH/s ⚙ diff 4 k ∙ ping 16ms

On the first run, the script will ask for the following configuration:

  • Wallet Username: This is what you created in the previous step.
  • Mining Intensity: Normally it’s 95 percent but if you aren’t using the Raspberry Pi for something else, you can go up to 100 percent.
  • Mining Threads: This depends on your Raspberry Pi hardware. Mine has four cores, so I chose four threads.
  • Mining Difficulty: For the Raspberry Pi, a low setting is recommended
  • Designate a Rig Name: You can choose not to add a name, but I suggest using a name so you can easily track your stats.
  • Developer Donation: You can choose to support the developer or not.

Then the miner will start its work. And that’s all you need to do to start mining Duino-Coin on the Raspberry Pi.

A tutorial on how to crypto mine with Raspberry Pi. | Video: NetworkChuck

More on Crypto23 Crypto Apps to Know

 

Track Your Mining Progress

You can go to your wallet to check your miner stats:

GUI Wallet shows my stats after a couple of hours. | Screenshot: Nuno Bispo

As you can see, after a couple of hours, the results are not a million dollars but an estimated $0.003 daily.

Keep in mind, however that this is an old Raspberry Pi 3. New models like the Raspberry Pi 4b can produce up to 1.75 MH/s, compared to my ridiculously low 252.35 KH/s.

While I might not get rich, it took me less than five minutes to start mining and I had an extra Raspberry Pi. It’s a nice, slow-growing side income with little effort. Maybe in a year, I’ll be able to afford a nice coffee.

Crypto mining is a hot topic in the world of technology and finance. Raspberry Pi offers an inexpensive entry point for those looking to start making money through cryptocurrency.

While it’s not as powerful or efficient as some more expensive solutions, it can still provide you with a steady stream of income.

How to Mine Cryptocurrency with Raspberry Pi

Skip to main content

When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.

(Image credit: Tom’s Hardware)

With Bitcoins trading at almost $50,000 per bitcoin, perhaps it is finally time for me to get into the cryptocurrency game? Instead of buying bitcoins, could I use my Raspberry Pi to mine for bitcoins instead? 

What is Cryptocurrency mining? 

Crypto mining is the digital version of mining for gold, combining performing complicated calculations and pure luck (being the first to complete the calculation) with your computer. Mining is essential to cryptocurrencies in order to maintain their distributed ledger, aka Blockchain. 

While Bitcoin is the most well-known form of cryptocurrency, it’s hardly the only game in town. All forms of cryptocurrency use blockchains to maintain the validity of each transaction and prevent someone from fraudulently spending their coins more than once.

Is Raspberry Pi Bitcoin mining profitable in 2020? 

My initial research showed that mining for bitcoins with any consumer grade computer is not profitable when factoring in the cost of electricity and hardware. Most bitcoin mining is now done on ASIC Bitcoin Miners; hobbyists and individuals can find limited success by joining a mining pool, harnessing the power of a group of distributed computers. What if we joined a mining pool, used solar panels to power our Pi, and ‘wrote-off’ the cost of our hardware? Bitcoin mining is an extremely competitive venture with too many other miners, increasing difficulty levels, and lower rewards for miners

Despite this gloom and doom news, I decided to forge ahead with this project and set my sights on alternative cryptocurrencies. As of the writing of this article, there are over six thousand alternative cryptocurrencies traded today.

(Image credit: Tom’s Hardware)

Mining Pools

Individual cryptocurrency mining was out of the question since we are using a Raspberry Pi and not an ASIC Bitcoin Miner. I looked at several mining pool software groups I could join; most had options for Windows and MacOS; there were no mining pools with support for Raspberry Pi. Raspberry Pi is not supported by Linux miner software due to its ARM Architecture. Supported Linux mining software is based on x86 processors found in typical PCs.

Disclaimer: This article is presented as an educational opportunity to spark interest in learning more about blockchain and cryptocurrency, and not necessarily to generate cryptocurrency. The methods described in this article are hacks and not officially supported. The easier and faster method is to download and install the free software associated with the mining pool of your choice on your PC. 

What You’ll Need for this Project 

  • Raspberry Pi 4 or Raspberry Pi 3
  • 8 GB (or larger) microSD card (see best Raspberry Pi microSD cards) with a fresh install of Raspberry Pi Lite OS or Raspberry Pi OS with Desktop.
  • Power supply/Keyboard/Mouse/Monitor/HDMI Cable (for your Raspberry Pi)
  • Optional (Recommended): Heatsinks and fan for your Raspberry Pi
  • Optional: Solar Panel Power Bank with USB-C
  • Optional: Raspberry Pi Cluster Case with Heatsinks and Fans

This tutorial is based on terminal commands. If you are not familiar with terminal commands on your Raspberry Pi, we highly recommend reviewing 25+ Linux Commands Raspberry Pi Users Need to Know first 

How to Mine for Cryptocurrency on Raspberry Pi

We will start by creating our account with Minergate, a cryptocurrency mining pool with 3.5 million users worldwide for Bitcoin Gold, Zcash, Ethereum, Ethereum Classic, and Monero. This tutorial is specific to mining Monero as it was the only cryptocurrency I had any level of success with.

(Image credit: Tom’s Hardware)

2. Boot your Raspberry Pi. If you don’t already have a microSD card see our article on how to set up a Raspberry Pi for the first time or how to do a headless Raspberry Pi install.

3. If you are using Raspberry Pi OS with Desktop, open a Terminal, or press Ctrl-T. If you are using Raspberry Pi Lite, login as you would normally.

4. Once in your terminal, run the following updates and install the necessary dependencies: 

sudo apt-get update && sudo apt-get upgrade -y
sudo apt install git automake autoconf libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev 
cd cpuminer-multi

(Image credit: Tom’s Hardware)

5. Now, let’s compile the mining code with the following three commands. This step will take a couple of minutes on a Raspberry Pi 4.

sudo ./autogen.sh
sudo ./configure
sudo ./build.sh

(Image credit: Tom’s Hardware)

6. After building and configuring our mining software on our Raspberry Pi, let’s start mining for Monero! Enter the following terminal command to start the miner, replacing YOUR_EMAIL with the email address you used to signup for your Minergate account.

./cpuminer -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u YOUR_EMAIL

You should see the mining software start and hopefully see a few shares ‘accepted’ with ‘yes!’

(Image credit: Tom’s Hardware)

7. Let’s check your Minergate Dashboard by logging into https://minergate.com/internal. You can do this on a Chromium browser if using Raspberry Pi Desktop, or on your PC. Scroll down your dashboard until you see Monero. If everything is working, your Monero Status will indicate ONLINE. Congratulations! You’re now mining for Monero! 

(Image credit: Tom’s Hardware)

How to Start Raspberry Pi Crypto Mining on Boot 

To automatically start our cryptocurrency miner on boot on our Raspberry Pi, we’ll use the Crontab method.

crontab -e

If you haven’t set the crontab previously, you’ll see the response “no crontab for pi, Select an editor.”

1. Type ‘1’ and hit Enter.

2. This will open a new crontab file, arrow down to the bottom of your crontab file and enter the command below, replacing YOUR_EMAIL, with the email address you used when creating your Minergate account

@reboot sudo /cpuminer-multi/cpuminer -a cryptonight -o stratum+tcp://xmr. pool.minergate.com:45700 -u YOUR_EMAIL

(Image credit: Tom’s Hardware)

4. Press Ctrl-X, and y to save your crontab.

5. Now reboot your Pi by typing ‘sudo reboot’ in your Terminal.

How much Monero did I mine with Raspberry Pi? 

My Raspberry Pi 4 calculated 357 good shares in about 8 hours of run time. Miners are rewarded for good shares. Bad Shares are calculations where I came up with the right answer, but my Pi produced the results slower than another computer. Miners only get paid when they submit the correct answer first. Invalid shares are the worst as a miner is penalized for every invalid share due to possible fraudulent activity. I was a bit worried when my first 4 shares were marked as invalid shares. 

(Image credit: Tom’s Hardware)

357 good shares = 0.000001410642 Monero = 0. 00015569 USD

I made the equivalent of 1/100th of a penny in 8 hours.

In order to withdraw my Monero, I needed a minimum of 0.05 Monero, approximately equal to $5.811 USD. (Exchange rate at the time of the writing of this article.) At a pace of accumulating 0.000001410642 Monero per 8 hours, it would take me 3,762 years to reach the minimum withdrawal threshold of 0.05 Monero. 

(Image credit: Tom’s Hardware)

Lessons Learned about Raspberry Pi Crypto mining

As stated at the beginning of this article, the purpose of this exercise was to learn about cryptocurrency and not to make a profit.

  • Cryptocurrency mining rewards are calculated by shares and hash rates. My hash rate varied from 1.6 H/s to 33.3 H/s. The average hash rate for the pool was 10.27 MH/s, approximately 3 million times my Pi’s hash rate. For reference, 1 MH/s is 1,000,000 hashes per second.
  • The mining pool company (in this case Minergate), also charges a small commission on your transactions. You have the choice of luck based commission (higher risk, higher reward), or Pay Per Share (higher commission for Minergate, but less risk).
  • At various points during the writing of this article, my Pi had numerous ‘time out’ errors and ‘send_line failed.’ Sometimes a reboot of the Pi would help, and sometimes, the miner would eventually start working again without human intervention.

(Image credit: Tom’s Hardware)

  •  While the Raspberry Pi was not a ‘money maker’ in the crypto mining game, the excitement factor of watching my Pi successfully calculate and accumulate good shares was enough for me.
  •  Is there something more productive I could do with my spare Raspberry Pis? If you’re interested in donating your spare computing power to finding potential treatments for COVID-19, check out World Community Grid. With World Community Grid, you can download and install a software package on your Raspberry Pi that will run a simulation to help predict the effectiveness of a chemical compound as a possible treatment for COVID-19. Check out our recent article about World Community Grid here. 

Topics

Raspberry Pi

Cryptocurrency

Tom’s Hardware is part of Future US Inc, an international media group and leading digital publisher. Visit our corporate site .

©
Future US, Inc. Full 7th Floor, 130 West 42nd Street,
New York,
NY 10036.

Raspberry pi mining / Sudo Null IT News

Raspberry pi mining

This article will help you learn what cryptocurrency is. Why mine it? What is its feature? How to mine on Raspberry pi single board computer? How much can you earn from this? The article is very informative and suitable for beginners in this business.

Can you mine with raspberry pi? Yes, you can. It is possible to do this on Raspberry pi 3 and 4. Of course, on the fourth, mining will go faster.

We will not mine large coins like bitcoin or ethereum. We will mine Monero coins. There are several reasons for this, which I have mentioned below.

Spoiler: this business is not profitable. This project will rather be interesting for those who would like to try themselves in this business and for the implementation of an interesting project.

What is cryptocurrency and why to mine it?

If you already know this information, you can skip to the next chapter. Cryptocurrency is a kind of digital currency that is used as a means of payment for goods and services, in simple words, it is money. The peculiarity of cryptocurrency is that it is possible to complete the process of a monetary transaction without involving a bank in it. Most likely you have heard of a coin called bitcoin, it refers to large coins, but there are other types of coins besides bitcoin. In this article, we do not cover how to mine bitcoin or ethereum, since mining such large coins is too difficult for a single board computer like raspberry pi. But Monero coins will be the very thing. A little lower, I indicated why Monero is the optimal coin for mining on raspberry pi. Cryptocurrency must be mined to support the blockchain. (I know that it’s not entirely clear, now we’ll figure it out) Let’s first understand what a blockchain is. As we said earlier, the main feature of cryptocurrency is that you can send money without involving a bank. The question arises, who then monitors the transaction? The transaction is monitored by all people associated with this cryptocurrency and track it. Cryptocurrency is decentralized. We can say that users record transactions in a notebook and this notebook is called blockchain .

In mining, you will often come across an expression such as a hash. The hash or hash function is one of the main components of modern cryptography and the blockchain algorithm. Hashing is the transformation of any amount of information into a unique set of characters that is unique to this array of incoming information. This set of characters will be called a hash.

We generate a transaction hash and combine it with a bunch of other transactions at about the same time, group them into a block, and then associate another block with it and another block with it . . and get a chain of blocks — a blockchain. This blockchain, this ledger or diary of a cryptocurrency that contains every transaction ever made for that cryptocurrency. Miners are needed to make sure that it cannot be changed, faked or hacked. Miners make sure that the blockchain is secure. The job is to add new blocks to the blockchain. In cryptocurrencies, when transferring funds, the transaction request is placed in a kind of waiting room. Transactions are waiting to be processed by miners and recorded on the blockchain forever. What should our mining machine do? She has to solve a kind of puzzle — a cryptographic hash puzzle. If our computer can solve it, we will get the honor of adding the next block to the blockchain. We will be richly rewarded for our efforts. If you manage to add a block to the Bitcoin blockchain, you will be rewarded with BTC 6.25, which equals $317,538 (at the time of writing). Obviously it’s not that easy, because we’re not the only miners. There are tons of other people trying to solve the same puzzle. There is only one correct answer and they all compete to be the first to find the answer. In this article, I will not delve into solving the hash puzzle, just be aware that this is a very difficult mathematical problem.

This is why the raspberry pi is not suitable for mining Bitcoin, Ethereum or any other very famous cryptocurrency. The more miners, the more difficult it is to solve this crypto puzzle. There are a bunch of people who mine bitcoin and ethereum. They use powerful graphics cards or things like ASIC miners that are made just for mining. ASIC stands for «Application Specific Integrated Circuit» (English: «Application Specific Integrated Circuit»):

Relative to such large giants, the raspberry pi has no chance in bitcoin mining. So now let’s talk about Monero and why it’s a better option for us than Bitcoin or Ethereum. Monero doesn’t like ASIC miners. The creators of Monero think this is bad for the blockchain. If someone has a lot of these ASIC miners, then they will be able to add more blocks than anyone else and have more control over what is added to the blockchain and, accordingly, it will become more centralized, which can lead to a monopoly. Monero decided to do things differently. They decided to use the random X algorithm, which makes mining with ASIC miners unprofitable.

Monero’s goal was to allow anyone to mine, any computer and even a small device like the raspberry pi. This results in their blockchain being more decentralized, where many more people have the opportunity to write a block to the blockchain.

We will need:

  • Raspberry pi (third or fourth).

  • MicroSD memory card (I have 64 GB. After installing everything necessary, the memory was filled with 5.8 GB).

  • Memory card adapter.

Download the necessary and prepare the Raspberry pi

You need to install the Raspberry Pi Imager. Here is the link: https://www.raspberrypi.com/software/ Click download for macOS / Windows / Ubuntu for x86 or through the terminal:

 sudo apt install rpi-imager 

We need a 64 bit image — raspios_lite_arm64.

Go to the folder with the latest date. At the time of writing the article, a folder with the date 2021-11-08 was used, download the zip file and unzip the folder.

Open Raspberry Pi Imager, click CHOOSE OS > Use custom and select our unzipped .img file. After, we connect our memory card to the computer and select it through Choose storage.

Open Advanced Options via Ctrl+Shift+X.

Enable SSH and set a password to enter our raspberry pi.

Set wi-fi to connect via Configure wifi.

Save (save) and start recording (write).

We will be warned that everything on the memory card will be deleted and asked if we want to continue. We press Yes.

Recording will take a couple of minutes.

We take out the memory card and insert it into the raspberry pi.

Now we need to connect it to power, but first I advise you to check the connected devices to wi-fi and after turning on the raspberry pi by checking it again you can easily find out the ip of the raspberry pi.

Checking connected devices to wi-fi can be done in different ways. I did it through the terminal.

 #For windows:
ipconfig/all
# for Linux:
ip a
#and for MAC:
arp -a 

After we connect to the raspberry pi through the terminal, we write ip raspberry pi which we learned above:

 ssh [email protected] 

We will be asked if we want to connect to raspberry pi, we write yes.
After, they will ask for a password, enter the password that we set through Advanced Options.
If everything is done correctly, it will come out:

 pi@raspberrypi:~ $ 

This means that we have successfully logged in and can start setting up the raspberry pi for mining.

Installation of programs for Crypto-Mining

Let’s update our repositories:

 sudo apt update 

Install prerequisite programs:

 sudo apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y 

Clone repository: 90 clone05 git05 ://github.com/xmrig/xmrig.git

Go to the folder:

 cd xmrig 

Create a folder and go there:

 mkdir build
cd build 

Install the program by building it from source:

 cmake . .
 make 

This will take a fair amount of time. It took me approximately 30 minutes.
Progress is conveniently monitored by the percentage of completion that goes on the left.

Preparing a Digital Wallet

We will be mining Monero and will receive XMR money/coins. To store them, we need a digital wallet. Open https://www.getmonero.org/downloads/ . Download for the corresponding OS, install and open. Select the desired language and click continue. Select Simple mode. We create a new wallet. Here we will be given a mnemonic phrase that you need to write down for yourself. We will need it when restoring the wallet. After, set the password for the wallet. We press create. They will immediately ask us for the password from the wallet that we just set. If we go to the left menu in the account, we can see our accounts. Here we need the address of our account to start mining.

Start mining

If we are in the same folder, enter the command:

 . /xmrig -o gulf.moneroocean.stream:10128 -u 41d...zd 

or this command if you rebooted the raspberry pi:

 xmrig /build/xmrig -o gulf.moneroocean.stream:10128 -u 41d...zd 

gulf.monerooceon.stream:10128 — mining pool . The fact is that the power of one raspberry pi will be very small to solve the problem that the system gives us. A mining pool is a place where other people (computers) gather to solve a complex hash puzzle together, get XMR money and divide it according to who decided how much.

451…zd — your account where the award should go.

Also, if you use more than one machine for mining, you can add a command to name (pi1) your machines: -p pi1

After running this command, mining on our raspberry pi starts.

We can follow the process.

The appearance of new job means that our machine has taken on a new task to solve.

Appearance accepted means that our decision was made and we were rewarded for it.

The appearance of rejected means that we were too slow to contribute to the problem.

Also, there are several commands for checking and getting information from the process. By pressing the button C , we will receive information on this connection.

By pressing the button H we can see our hash rate. This is a kind of speed of our mining.

By pressing the button S , we will get information about how many decisions have been made.

Is it profitable to mine on raspberry pi and how much can you earn on it?

By opening https://moneroocean.stream/ and entering our wallet there, we can see how fast mining is going on:

For me it is about 10H/s . We will need this information for further calculations. Open mining calculator , select the crypto that we are mining, in our case it is XMR, drive in the mining speed, power consumption and the price for electricity. Excluding electricity costs, at the rate at the time of writing, my raspberry pi 3 earns $0.01047 or XMR 0.00005732 per month:

On raspberry pi 4 (8 GB RAM), the speed can go up to 100H/s. Obviously, mining on the raspberry pi is not the most profitable business. But I think to enter this area, this is a fairly simple and affordable way. Also, if you have a free raspberry pi, why not try this interesting project.

Complement

I would like to share a few commands that were useful to me.

Setting for multiple Wi-Fi with priorities

Raspberry Pi uses wpa_supplicant.conf to connect to WiFi.

To edit the file, use the following command:

 sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 

If we scroll to the bottom of the file, we can see the following:

 network = {
    ssid="wifi"
    psk="password"
} 

If this already exists, we can replace it with the one you need with priorities or add it:

 network={
    ssid="wifiOne"
    Priority=100
    psk="password"
}
network={
    ssid="wifiTwo"
    Priority=70
    psk="password"
} 

Raspberry pi connects first to the WiFi with higher priority and then one by one.
To save and close a file, press Ctrl + X, then Y and enter. At this point, the Raspberry Pi should automatically connect to the new network. Sometimes this does not happen and you need to reboot to connect:

 sudo reboot 
Automatically start mining on the Raspberry Pi at startup

This will be useful for us in case of power failures. There are several ways to do this. One of them is crontab.

Start editing file:

 crontab -e 

Press 1 and enter.
At the very end, add the command we need:

 @reboot sleep 30 && xmrig/build/xmrig -o gulf.moneroocean.stream:10128 -u 41d...zd 

Here we use the full path to the file (xmrig/build /xmrig) to run it.
@reboot sleep 30 — means start our mining after reboot after 30 seconds. Save the file and exit by pressing Ctrl + X, then Y and enter.

Mining on Raspberry Pi 3 — what you need to know and how to do it?

Author Oleg Donskikh Reading 7 min Views 320 Published

Do you want to mine Bitcoins using Mining on Raspberry Pi 3? Do you want to know how to mine BitCoin? Everything is very simple! Mining on Raspberry Pi 3. Mining on Raspberry Pi 3 is possible in principle, but due to the fact that it is still a very compact device, everything depends on performance.

If you want to learn how to mine Ethereum, we also talked about this.

Contents

  1. Step 1. What is BitCoin
  2. Step 2: Requirements
  3. Step 3: Create an account
  4. Set up payment
  5. Create a work account
  6. Step 3: 50030 required libraries
  7. Step 6: Install BFGMiner
  8. Step 7: Start mining Bitcoin
  9. Step 8: Conclusion

Step 1. What is BitCoin

Since you asked this question you most likely know what kind of cryptocurrency it is and have heard about it.

If you don’t already know, Bitcoin is a virtual currency created in 2009. Bitcoin has grown in reputation over the past few years, becoming a very popular cryptocurrency as a way to pay for services over the Internet.

Recently, the cost has risen sharply due to the huge coverage of the media for positive and negative reasons.

There are two ways to get Bitcoin:

— Manage them from the exchange, that is, buy them in any exchangers in your currency.

-Mine them. Mining is the process of verifying transactions on a blockchain.

Since the entire Bitcoin system is decentralized, each transaction is publicly viewed on what is known as the blockchain. This chain contains every bitcoin that is exchanged between users, so since there is no central server, it must be managed on its own. This is the work of the miners.

Step 2: Requirements

To get bitcoin, you must have:

  • Poole account
  • Bitcoin Pore
  • Raspberry Pi
  • Raspbian SD-cards
  • SHAM 3,0002 : Create account

    You need to do two things:

    • Download bitcoin wallet
    • Create pool account
    • Set up payment and register account
    • Download bitcoin wallet

    By the way, we have already written about the best wallets for storing Bitcoins.

    A wallet is a program that is installed on your computer that gives you a wallet, it 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 need to save the file wallet.dat , keep this file safe as it contains a unique wallet address including all bitcoins you will receive. If you lose this file, you will not be able to recover any bitcoins it contains.

    Create a pool account Once you have a wallet address, create a pool account. The pool is a huge collection of other people working to get bitcoins. Due to the complexity of bitcoin development, it has become unrealistic for single mining, the act of processing millions of numbers to solve the block problem. By working as a group or a pool, everyone can get a chance to get bitcoin. There are many pools in this tutorial. I will use one of them called pool Slush : https://bitcoin. org/en/download

    Payment setup

    Raspberry Pi 3 mining includes this item. When you have created a pool account, you need to enter your unique wallet in the bitcoin payout address.

    Create a worker account

    The next step is to create a login account. In your pool account, you can create something called a worker for each of your bitcoin miners, so that you can only control them all separately if you fail.

    Each worker has his own name and password. While you are in my account «Register a new account» and name it, for example; worker and password. You are now ready to set up your Raspberry Pi for Bitcoin.

    Step 4: Set up your Raspberry Pi

    Start with a fresh install of Raspbian.

    If you plan to run 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 require a lot of power, as little as one meter per miner. Mining on the Raspberry Pi 3 will, as you understand, not be as productive as on powerful mining farms.

    With your USB miner connected to your Raspberry Pi, let’s install everything.

    Step 5: Install the necessary libraries

    In addition to the Raspberry Pi 3, as we know, professional miners create special mining farms for cryptocurrency mining. We have compiled a list of the best devices to choose for mining in 2017. We tried to tell as much as possible about the best solutions.

    The miner to be installed comes as source files, which means that the program must be compiled into a binary file before it can be run. Building a program, in this case BFGMiner, requires a lot of dependencies.

    Dependencies are additional software or libraries that a program needs to compile correctly because it was designed with them to make the software more efficient. Hopefully you will see the Raspbian desktop, so double click on the LXTerminaland type like so:

    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.

    Step 6: Installing BFGMiner

    With all the dependencies installed, it’s now time to download and install BFGMiner, so enter the following into LXTerminal. If you’re waiting, that’s fine, it should take a few minutes and it takes some patience.

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

    ./autogen.sh

    ./configure

    make

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

    Step 7: Start Mining Bitcoin

    You are now ready to start mining. To do this, if you are using a Slush pool, you will use the following command:

    ./bfgminer -o stratum.bitcoin.cz:3333 -O username.worker: password -S all

    The username section has two parts : The username you use to log in to the pool, and worker, which is the worker name you provided when registering the worker. Finally, the password that was set when the worker was created.

    The username section has two parts: the username you use to log in to the pool, and the worker, which is the worker name you provided when registering the worker. Finally, the password that was set when the worker was created.

    That’s a lot of numbers, so I’ll make some of them more clear.
    Current production rate , usually calculated in megayachts or gigashes. The number of hashes per second that can be computed is better. A hash is an algorithm for converting numbers and letters into an unresolvable set of characters. So the miner is used to process millions of numbers to match the hash to guess the original number. The more hashes that can be processed, the faster she can solve the problem.

    Number of accepted shares . The pool share is to show that the miner has successfully developed a given problem, so the more shares you can process, the better your reward from the pool.

    Detailed information about accepted promotions and pool updates. This is a running log of what is currently happening with miners and information about the underlying pool, such as notifications about updates and when new blocks are found.

    More information can be found on the gifub BFGminer website.

    So we talked about Mining on Raspberry Pi 3. For more questions on the topic, write in the comment form. Also tell us on what device and characteristics you are mining Bitcoins, Ethereum or other cryptocurrency.

    Step 8: Conclusion

    By following these steps, you will be left with a very energy efficient booster, as a Raspberry Pi only uses four watts of power, while a miner is typically 2.5 watts. It used to work with computers consuming more than 700 watts for the same process, so for the transition to savings, it helps to pay off the costs of the equipment that we use.

    All you have to do now is sit back and watch the money grow. While it is important that you understand that the value of bitcoin fluctuates wildly, it is extremely volatile, so invest at your own risk.