Bitcoin / Multi Crypto Coin Ticker with 24 candlesticks chart
-
Hi everyboy
Yess! I made good progress with my project, a Crypto Coin Price Ticker for monitoring crypto currencies on your desktop in a nice good looking and small device.
I have modified and enhanced some existing code i found to use with our great M5Stack Device (The CORE1 Version - with 3 buttons !) .
The original core of the code was from a github users project github.com/olbed/bitcoin-ticker
I ported it to M5, added many new features and now I want to share my resutls to all of you who wants a nice price ticker on your desktop to track your favorite crypto coins easily.Get rid of your daily routine to turn on the PC or mobile phone for nothing important and only distracting stuff... Just see your loved Crypto and "forget" ! :)
edit: btw - look at this rise in btc from march 2020 to now on the picuturesdownload project: https://github.com/frittna/Crypto_Coin_Ticker
read the info for the easy installation method or compile yourselfupdate: fan video by user "kevinbrice" https://www.youtube.com/watch?v=3uQINs6fpio
just a test in white:
frittna -
@frittna
can you made the green frame to blue?The default icon is blue. -
it's the inverted original.. have you tried it on your M5? Then you can easely change it to any color you like in paint or use the bright original one m5_logo.png instead of m5_logo_dark.png, it is included like all other files you will need to compile it. I just like green.
-
@frittna hi -- i know this post is about 6 months old but i just wanted to say thank you so much for posting this!!! i have been looking for something EXACTLY like this, only this is much better in some ways than what i had in mind.
i do have one question for you -- which product from the M5Stack store do i need to purchase to have this fully functioning? is it the ESP32 Basic Core IoT Dev Kit? or the ESP32 Grey Dev Kit? the Core2 ESP32?
I am just curious as to what the cheapest option is without sacrificing any functionality. any help would be greatly appreciated, thanks!
-
@frittna i just noticed in the pics that the one you're using has the black frame which would lead me to believe that the ESP32 Basic Core IoT Dev Kit will be sufficient, yes?
-
@op8 sorry for the late reply, thank you very much, i still love it to watch the price on it. The M5 core is the regular black framed M5-core and the bottom is the M5GO/FIRE Battery Bottom Charging Base SKU:A014 from this M5-Stack-Shop (do not forget to buy the chargning base plate as i did, these are 2 seperate items to buy) It has the rgb-led strip built-in but it is only barely used in my code.. My Intention was to show major price movements with red/green flashing lights (and sounds) for example. Unfortunately i did not implement additional functions since then.
-
sorry -- i just now saw your reply! but thank you for responding and for the input! i just ordered the items needed, looking forward to putting this all together
-
Anyone successfully got this running on M5 Core 2?
-
@innovationsmaker no i don't have the new Core2 version or know further details but i guess it will need only minor adjustments..
I hope someone will try it out and post the results. Would be interesting for all other existing apps too.. -
SOLVED!!!!!. My arduino software was not compiling the program correctly. Thank frittna for her work and willingness towards the community. Thanks for everything.
Hello . I have a problem, as you can see in the image. Do you know how I could solve it? When it starts if it connects. but then the loop problem. Thanks.
Wifi connection Lost!
I help, please
When the program loads, it connects to the Wi-Fi correctly, but then it only makes it connect and disconnect, and the Wi-Fi connection lost message appears.
WiFiClientSecure client;
if (!client.connect(restApiHost, 443)) {
error("\n\nWiFi connection lost!");
wifi_error = true;
return false;
}
client.print("GET " + getRestApiUrl() + " HTTP/1.1\r\n" +
"Host: " + restApiHost + "\r\n" +
"Accept: application/json\r\n" +
"User-Agent: BuildFailureDetectorESP8266\r\n" +
"Connection: close\r\n\r\n");while (client.connected()) {
M5.Lcd.fillCircle(101, topPanel + (infoPanel / 2), 4, TFT_YELLOW); //busy light yellow
String line = client.readStringUntil('\r');
line.trim();
if (line.startsWith("[") && line.endsWith("]")) {
DeserializationError err = deserializeJson(jsonDoc, line);
if (err) {
error(err.c_str());
ws_error = true;
return false;
} else if (jsonDoc.as<JsonArray>().size() == 0) {
error("Empty JSON array");
ws_error = true;
return false;
} -
@xvr Do you have any details on how you fixed it not compiling correctly ? Currently experiencing the exact same issue with it connecting on startup but looping that Wifi connection lost thereafter...
-
@batucker
Hi, i was not able to track down the compatibility issue you both have. But it has to be related with my or your arduino version or wifi version used in it. It would be helpful if i would know if anybody has NO issues with my installation guide, since i know it is working for otheres too.. I was testing it on a fresh Win7x64 pc, my usual pc is win10 x64, Standalone or MS-AppStore-Version was no different and both are working good.But after all it would be best to make a quick version to load a precompiled BTC-PriceTicker file with the common SD-Loader App like many other apps from the community. With a seperate "settings.cfg" file which will be edited to only contains personal wifi settings and the coins you like to see. >>update: >>I tested the a promising ardunio library "SDConfig" which would be perfect but it will take some time to implement it..)
even better would be an simple osd-settings menu with button access inside the PriceTicker but that's no easy job for me without the experience of coding this on the m5 yet.
... -
I will post the end of my compiling log below so you can see my used lib versions.
log:
...
...
...
...
Multiple libraries were found for "WiFi.h"
Used: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: D:\TMP\ARDUINO\arduino-1.8.13\libraries\WiFi
Multiple libraries were found for "SD.h"
Used: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SD
Not used: D:\TMP\ARDUINO\arduino-1.8.13\libraries\SD
Multiple libraries were found for "ArduinoJson.h"
Used: C:\Users\myusername\Documents\Arduino\libraries\arduino_639782
Not used: C:\Users\myusername\Documents\Arduino\libraries\arduino_333198
Using library M5Stack at version 0.3.1 in folder: C:\Users\myusername\Documents\Arduino\libraries\M5Stack
Using library WiFi at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Using library Preferences at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Preferences
Using library Wire at version 1.0.1 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SPI
Using library FS at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\FS
Using library SD at version 1.0.5 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SD
Using library SPIFFS at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\SPIFFS
Using library Timezone at version 1.2.4 in folder: C:\Users\myusername\Documents\Arduino\libraries\Timezone
Using library Time at version 1.6 in folder: C:\Users\myusername\Documents\Arduino\libraries\Time
Using library WebSockets at version 2.3.0 in folder: C:\Users\myusername\Documents\Arduino\libraries\WebSockets
Using library WiFiClientSecure at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Using library arduino_639782 at version 6.17.3 in folder: C:\Users\myusername\Documents\Arduino\libraries\arduino_639782
Using library M5Stack-SD-Updater at version 0.5.2 in folder: C:\Users\myusername\Documents\Arduino\libraries\M5Stack-SD-Updater
Using library Update at version 1.0 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Update
Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\Users\myusername\Documents\Arduino\libraries\Adafruit_NeoPixel
Using library HTTPClient at version 1.2 in folder: C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\HTTPClient
"C:\Users\myusername\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-size" -A "C:\Users\myusername\AppData\Local\Temp\arduino_build_405473/Crypto_Coin_Ticker.ino.elf"
Sketch uses 1079642 bytes (82%) of program storage space. Maximum is 1310720 bytes.
Global variables use 52312 bytes (15%) of dynamic memory, leaving 275368 bytes for local variables. Maximum is 327680 bytes.btw: the one warning from "timezone" concerning a possible wrong architecture type while compiling the code is ok.. does not matter
have luck
-
Ran into same problem.
For me it was an issue with library/package versions - its important to stick exactly to the versions listed by @frittna
// name: from: version search library manager exactly for:
// ---------------------------------------+------------------------------------------+------ + --------------------------------------------------------------|
#include "Free_Fonts.h" // Library | Arduino | | |
#include <WiFi.h> // Board-pkg| -> Problems? look in the compiler log window what version of WiFi.h is used -> its the ESP32 version **see below |
#include <Preferences.h> // Library | Arduino | | |
#include <M5Stack.h> // Library | Arduino Librarymanager M5Stack | 0.3.1 | "M5Stack" |
#include <Timezone.h> // Library | Arduino Librarymanager Jack Christensen | 1.2.4 | "Timezone" |
#include <time.h> // Library | Arduino Librarymanager Michael Margolis | 1.6 | "timekeeping" |
#include <WebSocketsClient.h> // Library | Arduino Librarymanager Markus Sattler | 2.3.0 | "Websockets" watch for the exact version! |
#include <ArduinoJson.h> // Library | Arduino Librarymanager Benoit Blanchon | 6.17.3| "ArduinoJson" |
#include "M5StackUpdater.h" // Library | Arduino Librarymanager SD-Menu Loader | 0.5.2!| "M5Stack SD" i use 0.5.2 , not new 1.0.2 because of problems |
#include <Adafruit_NeoPixel.h>// Library | Arduino Librarymanager Adafruit NeoPixel | 1.7.0 | "Adafriut Neopixel" |
#include "FS.h" // Tool | github: esp32fs for SPIFFS filesystem | 1.0 | https://github.com/me-no-dev/arduino-esp32fs-plugin |
// ---------------------------------------+------------------------------------------+-------+----------------------------------------------------------------Also, be sure to use esp32 version 1.04 from the Board Manager. 1.06 did not work for me given the above versions.
Cheers,
Silvereq -
@silvereq
thank you very much for your informationi will update the instruction and btw, i am almost finished with a modified version of the code so that you can insert a config text file onto a sd card wich only has to contain the wifi-settings, timezone, pairs and the color of its name. I will updatede https://github.com/frittna/Crypto_Coin_Ticker soon.
It will then be much easier to "burn" the compiled app into the M5 and nobody needs to compile on its own if he is not intended to change or improove the bitcoin price tickerthx!
-
Finally i updated my project to a version with a SD-Card config file for Wifi-Settings and coinpars, colors, etc.
Now if you don't want to compile on your own you can load the precompiled .bin file with populair SD-Menu Loader App and get around all the hardcoding in Arduino-IDE with all the librarys and esp32 board manager..
all you need is to flash my .bin and have a sd card with a folder in root called "ccticker" which holds the file "ccticker.cfg" and the "data" folder for the graphic files.
I do not use SPIFFS memory anymore because it is easier without for the most people.. (btw: does anyone know if it is possible to burn with m5burner AND flashing spiffs together? Any info on m5burner to get the file and folder format right to flash a custom program like this?)
have luck
download my app at https://github.com/frittna/Crypto_Coin_Ticker/
-
@frittna I'm trying to build the application using the Arduino interface and I get one warning:
WARNING: library Timezone claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
I read a few article that say it still works even though the warning is displayed so I continued to try uploading to my M5Stack
When I compile and upload it completes 100%
Hash of data verified.
Leaving...
Hard resetting via RTS pin...However the M5Stack never does anything other than display a blank (black) screen.
Any thoughts on why that would happen?
Thanks,
Walt
-
@wwhite
hi!
maybe it is the wrong board manager? at menu: tools -> boards -> boardmanager - search for esp32 -> select version 1.0.4, not the new 1.0.6
have you tried the serial monitor to see what the serial output is? is there any, at 115200 baud rate?
btw: the one warning about avr architecture is no problem, its ok. -
@frittna Thanks for responding I appreciate your help. Thanks for confirming the Warning issue would be ok. I made certain I installed the 1.0.4 version per the instructions. I was able to grab some output from the serial monitor and it's this 9 lines constantly scrolling? Thanks again.
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
ets Jul 29 2019 12:21:46 -
@frittna OOPS - I lied to you! I seems that I no sooner installed the esp 1.0.4 version and the ide came up and said I had libraries with updates and I must have selected update. I found this because I thought I'd double check all of the libraries and the board versions. When I looked the board had changed to the latest version so I removed it and installed the 1.0.4. In a few minutes I was prompt regarding updates and this time I didn't allow the updates!
The good news is I'm up and running but stuck at Connecting to.........
If I'm compiling this way can I still use the config files on the sd card or do I have to hard code the wifi info?
Thanks again.
Walt