Raspberry Pi Counts Down To The Last Bitcoin

Even though it might appear to be pretend Internet money, by design, there are a finite number of Bitcoins available. In the same way that the limited amount of gold on the planet and the effort required to extract it from the ground keeps prices high, the scarcity of Bitcoin is intended to make sure it remains valuable. As of right now, over 80% of all the Bitcoins that will ever exist have already been put into circulation. That sounds like a lot, but it’s expected to take another 100+ years to free up the remaining ones, so we’ve still got a way to go.

Even though his device will probably no longer exist when the final Bitcoin hits the pool, [Jonty] has built a ticker that will count down as the final coins get mined from the digital ground. The countdown function is of course a bit tongue-in-cheek, but the gadget also shows slightly more pertinent information such as the current Bitcoin value, so you can always remember what a huge mistake it was not to invest while they were still worth pennies.

On the hardware side, this is a pretty simple project. The enclosure is laser cut 5 mm MDF, and it holds a Raspberry Pi 3, a MAX7219 32×8 LED dot matrix display, and a 10 mm white LED with accompanying resistor. The white LED is placed behind an acrylic diffuser to give the Bitcoin logo on the side of the display a soft pleasing glow when the device is powered up. There are no buttons or other controls on the ticker, once the software has been configured it just gets plugged in and away it goes.

As for the software, it takes the form of a Python script [Jonty] has created which uses Requests and Beautiful Soup to scrape the relevant data from bitcoinblockhalf.com. The script supports pulling any of the 19 variables listed on the site and displaying it on the LED matrix, which range from the truly nerdy stats like daily block generation to legitimately useful data points that anyone with some Bitcoin in their digital wallets might like to have ticking away on their desks.

The first decade of Bitcoin has been a pretty wild ride, not only monetarily, but in the wide array of hardware now involved in cryptocurrency mining and trading. From Bitcoin traffic lights to custom-made mining rigs that are today more useful as space heaters, it takes a lot of hardware to support these virtual coins.

15 thoughts on “Raspberry Pi Counts Down To The Last Bitcoin

  1. doesnt bitcoin need the miners to facilitate transactions? seems to be when the last coin is mined there will be no more incentives for miners to keep expensive hardware running and sucking power. they start pulling the plugs and bitcoin would eventually become unusable since no one is processing transactions anymore.

      1. Presumably…. If they don’t, bitcoin is dead…. And there’s no assurance they will. The current mining farms are in it not for the pittance transaction fees, but for the big score coin.

        1. My bet is that they will keep crunching transactions, because if after 130 years Bitcoin still works, chances are that it will be highly valuable. Let’s wait 121 years or so and see what happens.

    1. Seems like web scraping on a microcontroller would be quite a bit more difficult than just doing it in Python on the Pi. But if you send in your source code for doing it on an 8 bit MCU I’m sure Hackaday would run it.

      1. … so dont do the scraping / parsing on the uc. Have some cloud pre-processor that scrapes, parses, and presents a REST interface or just spits out something easy to parse like JSON.

  2. “limited amount of gold on the planet and the effort required to extract it from the ground keeps prices high”

    That is not how currency works at all. No nation on earth is foolish enough to use gold anymore, rather basing the value of currency on the likelihood of trading that currency in for goods and/or services at a later date as well as the quality of said goods/services. Gold was a crude method of accomplishing that.

    Currency is essentially a barter token, or IOU, that can be used to trade for goods/services without having to provide an equal value of goods and services in the trade by using a third party anchor of trust (the entity that issued the currency).

    1. A Pi 3 can’t mine Bitcoin (nothing can mine Bitcoin at a usable rate except Bitcoin ASICs), but it can mine Radioearn. It doesn’t make much profit – enough to cover the electricity use but it would take 2-3 years to break even on the cost of the hardware without accounting for difficulty increase. The Pi I use to mine it with also supervises a cheap tablet mining Swagbucks, which is very profitable even though the difficulty is quite high.

  3. Be careful to use the same type 4 module 8×8 matrix displays the Author used, otherwise you will find the pixel addressing is wrong which totally messes up the display output. There are modules that from the outside look almost identical, but the physical pixel connection mapping to the MAX7219 chip is orthogonal. [Personally I find these different modules easier to use when the display is horizontal, which by far is the most common use-case.] The thing to look for is a module with a PCB layout that allows the 8×8 displays to be separated (see the picture in the original article). Those modules are compatible with the Author’s software. Of-course with some effort you can re-write the Author’s code to work with the other type display modules. If you do I’ll bet the code will come out much cleaner. Another thing is the incompatible display modules are easier to find than the module the Author used, especially on the likes of Banggood where they cost around $4 bucks each compared to the $11 cost on Amazon for the module referenced in the Author’s article. The downside with buying from Banggood is that you have to wait much longer for shipping from China, especially now that (at my posting time) the two week Chinese New Year shut-down is upon us.

  4. Hi
    I have this error when I execute python
    pi@RPI_Price:~/Bitcoin-Bar $ python bcbar.py
    Traceback (most recent call last):
    File “bcbar.py”, line 33, in
    disp[x] = data[x] + ” ” + data[x+1].replace(‘,’,”) #Each element of disp is the Name of the parameter & its value. The commas present in the values have been removed for better displaying asthetics
    IndexError: list assignment index out of range

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.