ESP32/IoT B.Tech/Diploma Beginner

Bitcoin $ Price Tracker Using ESP32 & OLED Display

Bitcoin $ Price Tracker Using ESP32 WiFi Module & OLED Display which displays Bitcoin value in dollar along with changes in rate of exchange

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview
In this project, we will build a Bitcoin Price Tracker Using ESP32 WiFi Module & OLED Display. The device can be programmed to display the current Bitcoin price in US dollars. The best part of this system is you could set the device to display any cryptocurrency in any local currency. This can only be possible if there is an API available on one of the exchanges.
The Bitcoin Price Tracker is designed using the ESP32 development board, which has built-in WiFi. It connects to your WiFi network and fetches the updated Bitcoin price through the Coindesk API every 15 minutes. Along with the Bitcoin price, the device also displays the percentage change from yesterday’s closing price. It also lights up either a red or green LED depending on whether the price has increased or decreased.
The code is based on
Michael Klements
project, with some slight modification. Using this guide you can build your own Bitcoin Price Tracker with ESP32 & OLED Display.
Bill of Materials
We need the following components to build this project. You can purchase all these components from Amazon.
S.N.
Components
Quantity
Purchase Links

ESP32 WiFi Module

Amazon
AliExpress

LED 5mm ANy Color

Amazon
AliExpress

Resistor 560-ohm

Amazon
AliExpress

0.96" I2C OLED Display

Amazon
AliExpress

Jumper Wires

Amazon
AliExpress

Breadboard

Amazon
AliExpress
Hardware Setup & Circuit
The circuit for Bitcoin Price Tracker is very simple. I used fritzing Software to design the schematic.
Connect the SDA & SCL Pin of OLED Display to D21 & D22 of ESP32 Module. Connect the red & green LED to D18 & D19 respectively via 200-ohm resistor. Power the OLED Display using the 3.3V & GND pin of ESP32. The red LED here indicates the price of Bitcoin is going down while the green LED indicates the rise in Bitcoin price.
I used a breadboard to assemble the circuit as per the circuit diagram. You can build your own custom PCB for this project.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on a breadboard and you want
PCB
for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for
Bitcoin Price Tracker
looks something like below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from
ALLPCB
at
1$
only.
Download Gerber File:
Bitcoin Price Trcaker
You can use this Gerber file to order high quality PCB for this project. To do that visit the
ALLPCB
official website by clicking here:
https://www.allpcb.com/
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
You can assemble the components on the PCB Board.
Source Code/Program
The code/program for the Bitcoin Price Tracker is written on Arduino IDE with all necessary libraries installed on the system. Before moving to the code part, first, we need to add the following libraries to the Arduino library folder.
1. Adafruit SSD1306 Library:
https://github.com/adafruit/Adafruit_SSD1306
2. NTP Client Library:
https://github.com/arduino-libraries/NTPClient
3. Arduino JSON Library:
https://github.com/bblanchon/ArduinoJson
In the below code part, you need to change the WiFi SSID & Password & replace with that of your local network.

const
char
*
ssid
=
"************"
;
const
char
*
password
=
"**********"
;
Here is the complete code for this project. Copy it and upload it to your ESP32 Board.

#include <Adafruit_SSD1306.h> //Include the required libraries
#include <WiFi.h>
#include <Wire.h>
#include <HTTPClient.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <ArduinoJson.h>
#define SCREEN_WIDTH 128 //Define the OLED display width and height
#define SCREEN_HEIGHT 64
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C //I2C address for display
#define upLED 18
#define downLED 19
Adafruit_SSD1306
display
(
SCREEN_WIDTH
SCREEN_HEIGHT
&
Wire
OLED_RESET
)
;
//Create the display object
const
char
*
ssid
=
"************"
;
const
char
*
password
=
"**********"
;
const
int
httpsPort
=

;
//Bitcoin price API powered by CoinDesk - https://www.coindesk.com/price/bitcoin
const
String
url
=
"http://api.coindesk.com/v1/bpi/currentprice/BTC.json"
;
const
String
historyURL
=
"http://api.coindesk.com/v1/bpi/historical/close.json"
;
const
String
cryptoCode
=
"BTC"
;
WiFiClient
client
;
//Create a new WiFi client
HTTPClient
http
;
String
formattedDate
;
//Create variables to store the date and time
String
dayStamp
;
String
timeStamp
;
const
unsigned
char
bitcoinLogo
[
]
PROGMEM
=
// 'Bitcoin Logo', 128x64px
{
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0xff
0xf0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x07
0xff
0xfe
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x3f
0xc0
0x3f
0xc0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x7c
0x00
0x03
0xe0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x01
0xf0
0x00
0x00
0xf8
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x03
0xc0
0x00
0x00
0x3e
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x0f
0x00
0x00
0x00
0x0f
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x1e
0x03
0xe7
0xc0
0x07
0x80
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x38
0x03
0xe7
0xc0
0x01
0xc0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x70
0x02
0x24
0x40
0x00
0xe0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0xe0
0x02
0x24
0x40
0x00
0x70
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x01
0xc0
0x02
0x24
0x40
0x00
0x38
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x01
0x80
0x02
0x24
0x40
0x00
0x1c
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x03
0x80
0x02
0x3c
0x40
0x00
0x1c
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00

Technologies used

ESP32ArduinoWiFiBLESSD1306OLEDI2CArduino IDE

Hardware components

  • ESP32
  • Arduino
  • SSD1306
  • OLED

Software & tools

  • Arduino IDE
  • EasyEDA
  • Fritzing

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.