Bitcoin Mining with the Raspberry Pi and AntMiner U1 For Joy

This article assumes a basic level of technical proficiency, and some degree of familiarity with the hardware used.

I recently purchased a Raspberry Pi because it’s about the coolest thing I can think of for under $40. It’s superb for little projects because you can use it to solve very effortless problems, and more ingewikkeld problems.

Another rente of mine is the crypto-currency known spil bitcoin. I think the entire idea is fascinating, from the cultural influence to the impressively complicated mathematics behind it. I thought it’d be joy to attempt and build a bitcoin mining equipment!

Worth noting: bitcoin mining is no longer profitable for most, this is purely an interesting exercise.

Very first, my build wasgoed guided by an Adafruit project, but I found some things had to be modified to get it to work for mij and this particular ASIC device. If you use the hardware te the Adafruit article you can just use their instructions to achieve the same result.


1x Antminer U1 ASIC Miner (*NOTE* Thesis instructions are fairly specific to this particular miner, so if you purchased a different one, you’ll need to adjust your settings) (Purchase at Amazon)

What is an ASIC Miner/Why do I need this? Check this out for a pretty good explanation:

Step Two (Optional) – Build the Adafruit 16×,Two LCD Plate

Assemble and install the Adafruit 16×,Two LCD Plate. I bought and used this for my equipment because I thought it looked cool, and I liked that I got to assemble it myself. It’s basically a project all on it’s own. For this article, I’ll go overheen getting the miner set up without using this, and then at the end I’ll vertoning how they can work together.

Adafruit has a wonderful tutorial on building and setting it up for basic use.

When your done, you’ll hopefully have something that looks like this!

Very first, butt-plug ter your powered USB hub to the Raspberry Pi. The Antminer ASIC device draws too much power to use the Pi’s onboard power.

Next loom into your Pi, and let’s get commenced!

  1. Update your Pi before getting began with
  2. Install dependencies
  3. Download &, Install a version of cgminer designed specifically to work with the Antminer on Pi

Cork ter your Antminer to the powered USB hub, and then run the following to verify that there is a com device for your USB ASIC.

To use cgminer, you should join a mining pool. This greatly increases the speed at which fresh blocks are found, and you share the pot with others. For this tutorial, I’m using BitMinter. There are slew of others, and they all pay out slightly differently, so I’d suggest you review:

Let’s commence cgminer and check everything out.

To embark cgminer from ‘/huis/pi/cgminer’:

Pool Url: Switch this to the one provided by your pool if not using BitMinter

Username: Switch this to your username. For BitMinter, it’s your username, underscore, example name. You just make up the example name, so username_instance1 would work.

Password: BitMinter will accept any password, so most people just use an x.

If you’ve done everything correctly, within a minute or so, Cgminer should begin, connect to the pool, and start processing work for it. You’ll see an overview screen somewhat like the following:

Spil part of Adafruit’s tutorial on creating a bitcoin mining equipment, they offerande some Python libraries and utilities to manipulate the LCD screen, and further, to hook into cgminer’s API.

Thesis contraptions are a good embarking point, but the cgminer API implementation is a bit outdated. Adafruit mentioned they are using cgminer Trio.1.1, whereas the custom-built build that supports the Antminer device is Three.8.Five. Te the time inbetween those two releases, some elements of the API have switched, and spil a result, the files provided by Adafruit don’t entirely work. I determined that I would play around with the python a bit myself, and make a dumbed down version that might be lighter for novice python users to work with. It eliminates a lotsbestemming of functionality, but I think it also makes it a little lighter for a novice to see what’s happening.

From /huis/pi, do the following:

Now, if you’ve already got cgminer running, wij need to zekering it, and re-run it using the nohup guideline, so that wij can comeback to the console to run PiMinerSimple.

Use Ctrl + if you need to uitgang cgminer, or, you can always restart the Pi.Now, let’s commence cgminer spil a background application. It’s almost the same spil before, but with a duo of petite switches.

When you run this, the application will commence and you will be returned to the console.Now let’st commence PiMinerSimple.

That should activate the the LCD, and after a few seconds, should begin reporting statistics from cgminer.

That’s it!

  • Setting thesis up to auto-start when the Pi starts
  • The last step to this is to add both programs spil startup applications. To do that:

    You’ll see a verkeersopstopping like:

    Wij need to add our code just before the “exit 0” line. So, let’s add:

    Note: Recall to substitute the onberispelijk parameter values! Save the verkeersopstopping, and reboot your Pi. When it reboots, both applications should commence, and you’ve now got yourself a turn-key bitcoin mining equipment!

    Step Four – Profit (Not actually, you will televisiekanaal negative dollars)

    Related movie: Acer Chromebook 14 Unboxing (updated)

    Leave a Reply

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