-->
Page 2 of 2

Re: Get Bitcoin price

PostPosted: Sun Nov 19, 2017 7:42 pm
by javagate
Hey!

I really like what you did here and I'm very new to coding and ESP could you send me the current code that works on a NodeMcu and Oled screen.

Thanks!

Re: Get Bitcoin price

PostPosted: Mon Nov 20, 2017 11:33 pm
by Mmiscool
To hook up the OLED screen refer to the esp8266 basic docs. The oled uses i2c protocol.


As to the example. I believe it can be improved.

The following will update the display every 15 seconds.


Code: Select alltimer 15, [showme]

[showme]
memclear
cls
oled.cls()

ret = wget("api.coindesk.com/v1/bpi/currentprice.json")
oled.print("ESP Basic 3.0.Alpha 69", 10,1)
oled.print("BTC Price", 10,18)
oled.print(json(ret,"EUR.rate_float"), 60,18)
oled.print("Your IP is:", 10,36)
oled.print(ip(), 30,48)
wait

Re: Get Bitcoin price

PostPosted: Sat Dec 22, 2018 3:47 am
by denialthomus2
Hello,

Mmiscool wrote:To hook up the OLED screen refer to the esp8266 basic docs. The oled uses i2c protocol.


As to the example. I believe it can be improved.

The following will update the display every 15 seconds.


Code: Select alltimer 15, [showme]

[showme]
memclear
cls
oled.cls()

ret = wget("api.coindesk.com/v1/bpi/currentprice.json")
oled.print("ESP Basic 3.0.Alpha 69", 10,1)
oled.print("BTC Price", 10,18)
oled.print(json(ret,"EUR.rate_float"), 60,18)
oled.print("Your IP is:", 10,36)
oled.print(ip(), 30,48)
wait


Thanks for sharing this code is very nice but I have a question about which company to decide bitcoin price please suggest to me with sharing some details. Because of my company thinking in future invest payment for bitcoin.

Thanks again!