Live Desktop Crypto Ticker

2,885

47

5

Introduction: Live Desktop Crypto Ticker

About: DIY Enthusiast

When you are trading Cryptos it is always itching to constantly look at the prevailing rate. I wanted a gadget that could display the live Crypto rate without constantly refreshing the browser.

I have incorporated a slideshow effect for better appeal. The first slide will be an image of the Crypto logo, the second slide will be the live Crypto trading rate and the last slide will be the rate of change, that is it shows whether the price of Crypto has decreased or increased and by how much.

My first thought was to 3D print a case for this project and then when I saw a plastic box on my table, decided to recycle the old plastic instead of adding to the global plastic woes by 3D printing a new one.

I have got all the files in the git project page. You can get access to all the related files by clicking here.

Supplies

Hardware:

  1. Wemos D1 Mini (any other NodeMCU will do as well).
  2. SSD1306 Monochrome OLED display.

Tools:

  1. Box cutter.
  2. Electrical tape.
  3. A plastic box (optional)

Step 1: Getting the Enclosure Ready

My first idea was to add a Micro USB female connector to the enclosure and then connect the Wemos to it. But on second thought, decided to partially expose the Wemos's USB connector and RESET button outside the enclosure. This way, I need not take out the Wemos out of the enclosure for updating the code or re-purposing the setup for some other display based project. This will also allow me to RESET the Wemos when desired.

  1. First I inspected the plastic enclosure for any defects. While inspecting the enclosure, I saw that the plastic was partially translucent.
  2. The partial translucency in fact helped my cause. I placed the Wemos inside in the desired position and I could see it's outline from outside.
  3. With the Wemos's outline as reference, I used a piece of electrical tape to mark the dimensions of the cutout.
  4. In the last image, you can actually see the tape's border matching the Wemos's height.

Step 2: Cutting Through

  1. Using a box cutter, I cutout the plastic to make room for the Wemos.
  2. Similarly, made a cutout for the OLED display on the plastic enclosure's cover.

Step 3: Fixing the Wemos Tight

I slid the Wemos through the cutout on the side just enough to partially expose the USB connector and the RESET button of the Wemos.

To hold the Wemos tight in its place, used a fair bit of hot glue to affix the Wemos to its plastic enclosure.

Now it is ready to be tossed around.

Step 4: Putting It All Together

For the OLED display, I used strips of electrical tape to hold it against the cutout on the plastic lid.

The OLED display uses I2C protocol for communicating with the Wemos. So its just four wires, VCC, GND, SDA and SCL. You can use attached wiring diagram as a reference for the connection.

Alternately, you can prepare your own OLED shield for Wemos and get rid of the wires. I have designed a simple board and have generated the Gerber file. You can download the Gerber from here. You can get your PCB printed using JLCPCB's PCB printing service. With their online Gerber viewer, you can verify the PCB design before ordering. Use this link https://jlcpcb.com/IAT for great discounts and minimal PCB fabrication costs.

Step 5: Brining the Ticker to Life

This project uses Coindesk's API for getting the crypto rates. Its a free API, so I urge the users to use that with caution and fairly. Please do not bombard the server with multiple requests constantly. We may end up loosing the only free API we have.

With the disclaimer done, lets continue with the instructions.

Preparing the Image

Coindesk also has great images to go with their data. Replace the ISO name of the Crypto in this link https://downloads.coindesk.com/arc-hosted-images/eth.png with your desired Crypto's ISO value.

Couple of ISOs for popular Cryptos:

  1. btc for Bitcoin
  2. sol for Solana
  3. luna for Terra
  4. bch for Bitcoin Cash

Get more ISOs info here.

Once you have got the desired image, open that using Microsoft's Paint and resize it to 60x60 pixels. Save that as PNG itself. Please do not change the format.

Next you need a service to change the PNG to values that the microcontroller can decipher. Use this online PNG to XBM converter. The conversion will result in the creation of a XBM file that you need to download to your computer.

Time to download the Arduino code. Get your Arduino code from here. Mind the images.h file it is required as well.

Customize the Code

By default, the script or code or sketch is for displaying Bitcoin values. If you wish to replace that to some other currency, Press Ctrl + F on your keyboard and replace BTC with the desired ISO of your currency. For example, if you need Ethereum, replace BTC with ETH.

Mind the lettering case. For the PNG images it was lower case, but it is upper case here.

If you don't change the Boot logo in the images.h file, irrespective of the Crypto changed in the code, Bitcoin logo will be displayed by default.

Remember the XBM file that you just created using the first step ? Now Open the XBM file with Notepad or Notepad++ in Windows. Copy the values within the first curly "{}" brackets and replace the existing values in the images.h with that.

Set your Wifi SSID and Password in the place provided in the code.

By default, I have set the sketch to get the Crypto values every 2 minutes. This is to honor the Coindesk's free API. If you scroll through the code you should be able to figure the variable declaration. But please do not touch that, we may loose the only free and reliable API.

Now compile the sketch and upload it to the Wemos.

Step 6: All Done

Wow !! After the initial wait period of 2 minutes, we should have the Crypto values show up.

Anything Goes Contest 2021

Participated in the
Anything Goes Contest 2021

1 Person Made This Project!

Recommendations

  • First Time Author Contest

    First Time Author Contest
  • Stone Concrete Cement Contest

    Stone Concrete Cement Contest
  • Backyard Contest

    Backyard Contest

5 Comments

0
Zaldous
Zaldous

Question 5 months ago

Great project! Tiny and effective. How would I have to proceed in order
to change the value from dollar to euro for the exchange rate? Thank you!

0
Yungtoiv
Yungtoiv

Question 5 months ago on Step 1

Can i copy the code from somewhere?

0
ssiddharth
ssiddharth

Answer 5 months ago

Links are there in the writeup !

0
JemChalweDoPorzygu
JemChalweDoPorzygu

Question 6 months ago

Hey. Nice one. Is it easy to add additional currencies and make them loop and display each in like in 5seconds intervals

0
ssiddharth
ssiddharth

Answer 6 months ago

Its easy. You just need to move the text around in the second screen to fit all the info. And the its just copy paste kind of stuff into other screens. Multi-currency display is in works. Will add the code to the git when its done.