Micro BiDa - Bitcoin Price Micro Dashboard

by masteruan in Circuits > Microcontrollers

1573 Views, 4 Favorites, 0 Comments

Micro BiDa - Bitcoin Price Micro Dashboard

Domande? 02 123456 www.sitobellissimo.it.png

This is micro BiDa. A simple micro dashboard that show the current Bitcoin price by using Coindesk open API.

The Bitcoin price is showed in Dollar, Euro, English Pound and Ruble. The device is very little, based on ESP8266 microcontroller. The board is called CP2014 (WeMos TTGO ESP8266). You can find the board on Aliexpress (Search on Aliexpress) or Amazon (https://amzn.to/3vptRG8).

The project is in BETA, under Creative Common Licence. You can find the code and all the instruction in this article.

Supplies

ESP32 board CP2014 --> Amazon (https://amzn.to/3vptRG8)

The Cp2014 Board

IMG_6579.jpeg
IMG_6586.jpeg

Name: WeMos TTGO ESP8266 CP2014 ESP8266

Screen: 0.91″ - 128 * 32 OLED

Connections: WiFi - CP2014USB serial converter onboard

Main chip: ESP8266

Description

Cost-effective Internet of things development board. The main chip using ESP8266, with CP2014 USB to serial chip, lithium battery interface and charge and discharge circuit, 32MByte Flash, WIFI antenna, 0.91-inch OLED display. Can be programmed in Arduino and NodeMCU environments.

Leads all pins of ESP8266 12 digital pins can be configured to read, write, IIC, SPI, the middle, PWM and other functions 1 AD input Integrated 0.91-inch 128 * 32 OLED.

Working voltage: 3.3V ~ 7V
Board Dimensions: 50,86×18,2×6,69 mm
Dimensioni dello schermo: 30×11,5 mm

Arduino IDE and Environmental Requirements

Arduino1.6.4_IDE_small.png

Arduino is an open-source hardware and software company, project and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control both physically and digitally. Its products are licensed under the GNU Lesser General Public License (LGPL) or the GNU General Public License(GPL), permitting the manufacture of Arduino boards and software distribution by anyone. Arduino boards are available commercially in preassembled form or as do-it-yourself (DIY) kits.

This is the official page https://www.arduino.cc

All the steps for the software are:

  1. Download and install the Arduino IDE from the download page;
  2. Download and install the Arduino ESP8266 board (next step):
  3. Install libraries following this tutorial to install Arduino Library (https://www.arduino.cc/en/guide/libraries);

Install ESP8266 Board in the Arduino IDE

Install-ESP8266-Board-add-on-in-Arduino-IDE-enter-URL.png
Install-ESP8266-Board-add-on-in-Arduino-IDE-open-boards-manager.png
Install-ESP8266-Board-add-on-in-Arduino-IDE-search-ESP8266.png
ESP8266-Board-add-on-in-Arduino-IDE-installed.png

To install the ESP8266 board in your Arduino IDE, follow these next instructions:
In your Arduino IDE, go to File -> Preferences Enter the code below into the “Additional Boards Manager URLs” field as shown in the figure below. Then, click the “OK” button.

https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json

After this select Tool -> Board -> Board Manager.
In the Board Manager search for esp8266 and in stall the board and all the requirements.

The Software on GitHub

You can see the complete code on GitHub: https://github.com/masteruan/microBiDa

There are two version of code the original one and the "bigChar" version. All the photo of the tutorial are referred to the original version. Pay attention to the SSID and PWD section in the code. You must change the value for your LAN with internet access. The Coindesk API in the code are open. No required subscription to the CoinDesk website.

Conclusion

ezgif.com-gif-maker.gif
IMG_6583.jpeg

Now you have a micro BiDa! This is a beta version. The next features will be the possibility to change the FIAT currency and a 3D printed case. I will publish the update on my channels: Instructables - YouTube - Instagram

The API: How It's Work

API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message, or check the weather on your phone, you’re using an API.

The Modern API
Over the years, what an “API” is has often described any sort of generic connectivity interface to an application. More recently, however, the modern API has taken on some characteristics that make them extraordinarily valuable and useful:

  • Modern APIs adhere to standards (typically HTTP and REST), that are developer-friendly, easily accessible and understood broadlyThey are treated more like products than code.
  • They are designed for consumption for specific audiences (e.g., mobile developers), they are documented, and they are versioned in a way that users can have certain expectations of its maintenance and lifecycle.
  • Because they are much more standardized, they have a much stronger discipline for security and governance, as well as monitored and managed for performance and scaleAs any other piece of productized software, the modern API has its own software development lifecycle (SDLC) of designing, testing, building, managing, and versioning.
  • Also, modern APIs are well documented for consumption and versioning.