{"id":3675,"date":"2025-05-05T13:06:49","date_gmt":"2025-05-05T13:06:49","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=3675"},"modified":"2025-05-05T13:40:17","modified_gmt":"2025-05-05T13:40:17","slug":"esp01-today-exchange-rate-in-bdt-android-platform","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=3675","title":{"rendered":"esp01: Today Exchange Rate in BDT (Arduino Platform)"},"content":{"rendered":"\n<p class=\"has-text-color has-link-color wp-elements-e85bc2ab079c08fc8a4c945264013acd wp-block-paragraph\" style=\"color:#5c5c5c\">In my recent article we use esp01 microcontroller work as AT command mode to interface with STM32 for wireless communication. Esp01 is a powerful microcontroller to perform lots of function. It has 2 GPIO pin for controlling load and Tx &amp; Rx pin for programming. Simple UART module i.e. FTDI can program the chip. For programming we can use many platform but simplest to use Arduino Platform. For simply download go to-<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><a href=\"https:\/\/www.arduino.cc\/en\/software\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.arduino.cc\/en\/software<\/a><\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-8a07f4d21a4608018167d50b2dbedcb1 wp-block-paragraph\" style=\"color:#5c5c5c\">For programming the pin connection as follow-<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"372\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/02\/esp8266-pinout-1024x372.jpg\" alt=\"\" class=\"wp-image-3401\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/02\/esp8266-pinout-1024x372.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/02\/esp8266-pinout-300x109.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/02\/esp8266-pinout-768x279.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/02\/esp8266-pinout.jpg 1145w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/PIN-ESP01-1024x348.jpg\" alt=\"\" class=\"wp-image-3681\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/PIN-ESP01-1024x348.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/PIN-ESP01-300x102.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/PIN-ESP01-768x261.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/PIN-ESP01.jpg 1087w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-ce28769d1ac961e517b0069a3259b5aa wp-block-paragraph\" style=\"color:#5c5c5c\">The ESP8266 has three boot modes as follow-<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"135\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Table-1-1024x135.jpg\" alt=\"\" class=\"wp-image-3682\" style=\"width:781px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Table-1-1024x135.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Table-1-300x40.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Table-1-768x101.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Table-1.jpg 1297w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-10b717fba2b5710a98528db67bd47527 wp-block-paragraph\" style=\"color:#5c5c5c\">Reminder: Tx(GPIO0) &amp; Rx(GPIO3) both can be used as GPIO pin, buts once it used as GPIO the esp01 can never be program again. So be careful to select the GPIO.<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-6c7df5e66a2e6603a3bc713d838c60cd wp-block-paragraph\" style=\"color:#5c5c5c\">You may think only 2 GPIO pin so what can the chip perform. In our <a href=\"https:\/\/iotthinghub.com\/?p=3556\" target=\"_blank\" rel=\"noreferrer noopener\">TFT display Today Exchange Rate BDT<\/a> article we display live Exchanged Rate in BDT. In this article we only use esp01 mcu &amp; OLED for display purpose. Let\u2019s begin with some settings-\u00a0<\/p>\n\n\n\n<ul style=\"color:#252525\" class=\"wp-block-list has-text-color has-link-color wp-elements-f200371a27bcaedf0b033765ee31c8c5\">\n<li class=\"has-text-color has-link-color wp-elements-96208b72240aa6e405b803ecb65a1d13\" style=\"color:#252525\">Install the latest version of Arduino : <a href=\"https:\/\/www.arduino.cc\/en\/software\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.arduino.cc\/en\/software\/<\/a><\/li>\n\n\n\n<li>In Arduino: File>Preferences>Setting<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <a href=\"http:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/arduino.esp8266.com\/stable\/package_esp8266com_index.json<\/a><\/p>\n\n\n\n<ul style=\"color:#252525\" class=\"wp-block-list has-text-color has-link-color wp-elements-693203368ac48d550a0d23cefc5da0e4\">\n<li>In Arduino Install: Tools>Board<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; esp8266<\/p>\n\n\n\n<ul style=\"color:#252525\" class=\"wp-block-list has-text-color has-link-color wp-elements-5616550bf94b8110783a2fba13c55e64\">\n<li>In Arduino: Tools>Board>esp8266>Generic ESP8266 Module<\/li>\n\n\n\n<li>In Arduino Install: Library Manager<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-f27cbebdfddfdb71986be28854286c20 wp-block-paragraph\" style=\"color:#252525\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ESP8266 and ESP32 OLED driver for SSD1306 display<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-1ccc33175bf908528d1cca452f212898 wp-block-paragraph\" style=\"color:#5c5c5c\">If it see complex see my YouTube Video for details. We read the data from ThingSpeak ThingHTTP service. For your simply city just go to the link it will display in raw data-<\/p>\n\n\n\n<p class=\"has-text-align-center has-text-color has-link-color wp-elements-b6ccd495b495fc25636bf88abf33aac9 wp-block-paragraph\" style=\"color:#252525\">GET <a href=\"https:\/\/api.thingspeak.com\/apps\/thinghttp\/send_request?api_key=MET1M2GLDSKNNMJV\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/api.thingspeak.com\/apps\/thinghttp\/send_request?api_key=MET1M2GLDSKNNMJV<\/a><\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-d9902232ed9ad3b1c0d127c14dccbafd wp-block-paragraph\" style=\"color:#5c5c5c\">Use POSTMAN or any browser and you get the data, since it is a GET request. Let\u2019s see the connection diagram-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"578\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Exchange-Rate-Connection-1024x578.jpg\" alt=\"\" class=\"wp-image-3685\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Exchange-Rate-Connection-1024x578.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Exchange-Rate-Connection-300x169.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Exchange-Rate-Connection-768x433.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Exchange-Rate-Connection.jpg 1131w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-10bdc68f9d98d7e38705ee35c0687557 wp-block-paragraph\" style=\"color:#5c5c5c\">Reminder: The power problem is the major problem of esp01. You can minimize it by using 1000uF capacitor. If the capacitor can\u2019t solve your problem, then it recommended soldering all components into PCB board. <\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-9d619ca2a3a39bf0e2dd3e99daed863e wp-block-paragraph\" style=\"color:#5c5c5c\">Let\u2019s look at the programming part-<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\n#include &lt;ESP8266WiFi.h&gt;\n#include &quot;SSD1306Wire.h&quot;               \/\/ legacy: #include &quot;SSD1306.h&quot;\n#include &quot;Dialog_plain_8.h&quot;\n#define  SDA_ESP8266_V01   0           \/\/ GPIO0 pin for SDA\n#define  SCL_ESP8266_V01   2           \/\/ GPIO2 pin for SCL \nSSD1306Wire display(0x3c, SDA_ESP8266_V01 , SCL_ESP8266_V01);   \/\/ ADDRESS, SDA, SCL  \n\n\/\/ WiFi credentials\nconst char* ssid = &quot;Your_WiFi_SSID&quot;;       \/\/ Your WiFi SSID\nconst char* password = &quot;Your_WiFi_Password&quot;;   \/\/ Your WiFi Password\n\n\/\/ ThingHTTP settings\nconst char* host = &quot;api.thingspeak.com&quot;;\nconst String thingHTTPKey = &quot;MET1M2GLDSKNNMJV&quot;;               \/\/ Your API key\n\nWiFiClient client;\n\nvoid setup() {\n  Serial.begin(115200);\n\n  display.init();\n  display.clear();\n  display.flipScreenVertically();\n  display.setFont(ArialMT_Plain_16);  \/\/ Front : ArialMT_Plain_10\/16\/24                      \n  display.drawString(0, 0,&quot;Connecting WiFi...&quot;);\n  display.display();\n  WiFi.begin(ssid, password);\n  while (WiFi.status() != WL_CONNECTED) {\n    delay(500);\n    Serial.print(&quot;.&quot;);\n  }\n\n  display.clear();\n  delay(1000);\n  display.drawString(0, 0, &quot;WiFi Connected!&quot;);\n  display.display();\n  delay(1000);\n  display.setFont(Dialog_plain_8);  \/\/ Creating Smaill Front\n}\n\nvoid loop() {\n  if (client.connect(host, 80)) {\n    String url = &quot;\/apps\/thinghttp\/send_request?api_key=&quot; + thingHTTPKey;\n\n    client.print(String(&quot;GET &quot;) + url + &quot; HTTP\/1.1\\r\\n&quot; +\n                 &quot;Host: &quot; + host + &quot;\\r\\n&quot; +\n                 &quot;Connection: close\\r\\n\\r\\n&quot;);\n\n    \/\/ Skip headers\n    while (client.connected()) {\n      String line = client.readStringUntil(&#039;\\n&#039;);\n      if (line == &quot;\\r&quot;) break;\n    }\n\n    \/\/ Read and process response\n    String data = client.readString();\n    client.stop();\n\n    \/\/ Debug output\n    Serial.println(&quot;Raw HTML:&quot;);\n    Serial.println(data);\n\n    \/\/ Extract values from &lt;td&gt; tags\n    String tokens&#x5B;12];\n    int index = 0;\n    int start = 0;\n\n    while ((start = data.indexOf(&quot;&lt;td&gt;&quot;, start)) != -1 &amp;&amp; index &lt; 12) {\n      int end = data.indexOf(&quot;&lt;\/td&gt;&quot;, start);\n      if (end == -1) break;\n      tokens&#x5B;index++] = data.substring(start + 4, end);\n      start = end + 5;\n    }\n\n    \/\/ tokens&#x5B;0] = USD, tokens&#x5B;1] = 121.0000, tokens&#x5B;2] = 122.0000, etc.\n\n    display.clear();\n    display.println(&quot;CUR       BUY       SELL&quot;);\n    display.println(&quot;------------------------------------&quot;);\n\n    for (int i = 0; i &lt; 12; i += 3) {\n      display.printf(&quot;%s  %.4f   %.4f\\n&quot;, \n        tokens&#x5B;i].c_str(), \n        tokens&#x5B;i+1].toFloat(), \n        tokens&#x5B;i+2].toFloat()\n      );\n    }\n  } else {\n    Serial.println(&quot;Connection failed&quot;);\n  }\n\n  delay(30000); \/\/ Update every 30 seconds\n}\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color wp-elements-8f27833c6ba6683adbf17d1a66d5968e wp-block-paragraph\" style=\"color:#5c5c5c\">Open new sketch &amp; past the program along with changing of your WiFi SSID &amp; Password. Copy the front library &amp; Paste it into the project folder- <\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-6b2b10c588885dd8b0cefd578915a2b0 wp-block-paragraph\" style=\"color:#5c5c5c\"><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"\ud83c\udf10ESP-01( 8 pin MCU): Exchange Rate in BDT  (Arduino Platform)  \ud83d\udcf1 OLED Display\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/G-JSuujPtCA?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center wp-block-paragraph\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Dialog_plain_8.h\" target=\"_blank\" rel=\"noreferrer noopener\">Dialog_plain_8.h<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2025\/05\/Project-1.rar\" target=\"_blank\" rel=\"noreferrer noopener\">Exchange Rate All FIle <\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In my recent article we use esp01 microcontroller work as AT command mode to interface with STM32 for wireless communication. Esp01 is a powerful microcontroller to perform lots of function. It has 2 GPIO pin for controlling load and Tx &amp; Rx pin for programming. Simple UART module i.e. FTDI can program the chip. For [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-3675","post","type-post","status-publish","format-standard","hentry","category-esp01esp8266"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/3675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3675"}],"version-history":[{"count":9,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/3675\/revisions"}],"predecessor-version":[{"id":3697,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/3675\/revisions\/3697"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}