Bitcoin / Multi Crypto Coin Price Ticker with 24 candlechart
2023-01-08 | By M5Stack
License: General Public License Arduino
* Thanks for the source code and project information provided by @frittna
Story
MULTI CRYPTO COIN PRICE TICKER with 24 candle stick chart for M5Stack Core
##SD-CARD Version with configuration text file##
receiving WiFi data from Binance API/Websocket_v3
This will show a 24-candle chart, the min/max price and the volume as line, date and time are from time.nist.gov timeserver. For M5-Stack MCU, coded in ArduinoIDE 1.8.13 - last modified Nov.20.2021 15:20 CET - Version 1.0.53fix - using spiffs SDconfig (https://github.com/frittna/Crypto_Coin_Ticker)
LAST (small) EDITS:
-added cycling function (ButtonA ButtonC together) which steps through your currencies after a certain time (default:off; when on - default:15sec for each)
-added Timezone for Singapore (UTC 8)
-code merged to one version, so there is no need to have different versions anymore
-autodetect the built in SHT room sensor and adds a 12pixel high sensor panel when the M5Stack is in its vertical BTC stand (original grey holder)
-temperature unit C or F and offset can be set by SD-Config and is not hard-coded anymore (because the M5-Stack is heating up itself it will never be accurate and has only limited expressiveness.)
> do not forget to update your sdconfig.cfg on SD-card too <
##Using the App:
- This version needs a SD-Card (at least on first load) with your WiFi credentials, favorite coinpairs, timezone and language (eng/ger/esp) etc. in a textfile - see instructions
- ButtonA: switches through your favorite coinpairs (as many you want) e.g: BTC/USDT or LINK/BNB etc. which are available on Binance.com's spot maket.
- ButtonB: changes the LCD-Brightness in 4 levels
- ButtonC: 9 changeable Timeframes from 1 Minute to 1 Month
- turn OFF the device pressing the red button once OR by holding ButtonC for over 1 second if USB is connected
- Press buttonC, then, within 2 sec press buttonA to switch down, or buttonB to switch up through the timeframes: 1min->15mins->1hour->...or vice versa
- available timeframes are 1minute, 3m, 5m, 15m, 1h, 4h, 1d, 1w, 1Month
- if you hold ButtonC at Startup: it will start with alternative SSID2/WiFi-password2 instead (e.g your mobile phone's hotspot)
- press ButtonA and ButtonC together to enable/disable automatic cycling through all currencies after a set time (default: off, when turned on default: 15sec)
##Further description:
- The top info panel shows WiFi-strength, battery level, colored indicators for "busy", Sleep Timer on, price moving and if it is charging from usb (can have delay up to 30s)
- right now: English, German, Spanish (for day and month names)
- Sleep Timer: when holding ButtonB longer than 1, 5 seconds it will start a user defined timer to power OFF the device (45min default)
- If WiFi is failing more than 2 minutes, it reduces the reconnect interval and brightness level - after 10 minutes -> shutdown device
- SDMenu Loader compatible, if SD-Updater (menu.bin) is installed in your SD-card hold buttonA while booting up to start MenuLoader to load your apps (ver. 0.5.2 tested only)
- It is prepared for the use of a Neopixel RGB-LED bar (I use the built-in one in the Battery-Bottom Module for M5Stack/Fire with RGB 10 LEDs)
- All settings will remain stored in internal memory after a reset so you can eject the SD-Card after setting up you favorites.
- If you want to clear all stored settings from internal memory hold ButtonB at start-up
- If M5-Stack is in the BTC stand (the original grey vertical stand) the internal SHT room sensor is found and shows temp and humidity in degree F or C.
--> SEE CODE OR READMEs FOR INSTRUCTION IF YOU'RE NOT SURE <--
todos: e.g: alerts, more use of lights (sounds), wireless configuration method, a better prize formatting with very low or very high prices (e.g. there's a "problem" when btc goes past 100k ;) ....etc. (my Problem: lack of time and coding knowledge)
Code
MULTI CRYPTO COIN PRICE TICKER with 24 candlesticks chart for M5Stack
Bitcoin and Multi Crypto Coin Price Ticker with candlestick chart (Binance API Websocket) - SD-Config File Version — Read More
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum