From 27f9537e3156423ed842ad318ece97387b37b451 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 13 Aug 2024 23:43:18 -0300 Subject: [PATCH 01/49] feat: ST7789 display --- ESP_Code/DisplayHal.h | 40 +++++++++++++++++++++++++++++++++++++++- ESP_Code/ESP_Code.ino | 22 +++++++++++----------- ESP_Code/Settings.h | 11 +++++++++++ 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index dfde2490..078cbb72 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -56,7 +56,7 @@ } #endif -#if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) +#if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) void screen_setup() { // Ran during setup() // Abstraction layer: screen initialization @@ -78,6 +78,12 @@ lcd.home(); lcd.clear(); #endif + + #if defined(DISPLAY_ST7789) + tft.begin(); + tft.setRotation(1); + tft.fillScreen(BLACK); + #endif } @@ -290,6 +296,38 @@ lcd.print(sharerate); lcd.print("s"); #endif + + #if defined(DISPLAY_ST7789) + tft.fillScreen(BLACK); + tft.setTextColor(WHITE); + + tft.setTextSize(2); + tft.setCursor(2, 10); + tft.print("Hashrate: " + hashrate + " kH"); + + tft.setCursor(2, 30); + tft.print("Node: " + node); + + tft.setCursor(2, 50); + tft.print("Accepted/Total: " + accepted_shares + "/" + total_shares); + tft.setCursor(2, 70); + tft.print("Accepted Rate: " + accept_rate + "%"); + + tft.setCursor(2, 90); + tft.print("Ping: " + ping + " ms"); + + tft.setCursor(2, 110); + tft.print("Uptime: " + uptime); + + tft.setCursor(2, 130); + tft.print("Share Rate: " + sharerate); + tft.setCursor(2, 150); + tft.print("Difficulty: " + difficulty); + + tft.setCursor(2, 200); + tft.print("IP: " + WiFi.localIP().toString()); + + #endif } #endif diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 6e907d50..ab45709b 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -59,7 +59,7 @@ #include "Dashboard.h" #endif -#if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) +#if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) #include "DisplayHal.h" #endif @@ -140,7 +140,7 @@ void RestartESP(String msg) { Serial.println("Restarting ESP..."); #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info("Restarting ESP..."); #endif @@ -211,7 +211,7 @@ namespace { Serial.println("Poolpicker selected the best mining node: " + node_id); #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info(node_id); #endif } @@ -233,7 +233,7 @@ namespace { #if defined(SERIAL_PRINTING) Serial.printf("Error fetching node from poolpicker: %s\n", http.errorToString(httpCode).c_str()); #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info(http.errorToString(httpCode)); #endif @@ -368,7 +368,7 @@ namespace { #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info("Waiting for node..."); #endif SelectNode(); @@ -497,7 +497,7 @@ void task1_func(void *) { VOID LOOP() { job[0]->mine(); - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) float hashrate_float = (hashrate+hashrate_core_two) / 1000.0; float accept_rate = (accepted_share_count / 0.01 / share_count); @@ -526,7 +526,7 @@ void task2_func(void *) { VOID LOOP() { job[1]->mine(); - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) float hashrate_float = (hashrate+hashrate_core_two) / 1000.0; float accept_rate = (accepted_share_count / 0.01 / share_count); @@ -576,7 +576,7 @@ void setup() { } #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) screen_setup(); display_boot(); delay(2500); @@ -686,7 +686,7 @@ void setup() { #if defined(BLUSHYBOX) blinker.detach(); #endif - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info("Waiting for node..."); #endif #if defined(BLUSHYBOX) @@ -697,7 +697,7 @@ void setup() { blinker.detach(); #endif #else - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) display_info("Waiting for WiFi..."); #endif SetupWifi(); @@ -772,7 +772,7 @@ void single_core_loop() { lwdtFeed(); - #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) + #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) float hashrate_float = (hashrate+hashrate_core_two) / 1000.0; float accept_rate = (accepted_share_count / 0.01 / share_count); diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 13bc34fc..8485a7ad 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -60,6 +60,9 @@ extern const char PASSWORD[] = "PASSW0RD"; // Uncomment if your device is a Duino BlushyBox device // #define BLUSHYBOX + +// Uncomment to enable a ST7789 LCD screen, like t-display s3, on a direct bus to display mining info in real time +// #define DISPLAY_ST7789 // -------------------------------------------------------------- // // ---------------------- IoT examples -------------------------- // @@ -157,6 +160,14 @@ extern unsigned int ping = 0; Adafruit_LiquidCrystal lcd(1, 2, 3, 4, 5, 6); #endif + +#if defined(DISPLAY_ST7789) + #include + + // initialize the library + TFT_eSPI tft = TFT_eSPI(); +#endif + #if defined(USE_HSU07M) #include "Wire.h" #define HSU07M_ADDRESS 0x4B // Change this if your sensor has a different address From af0d7b2b73cc17edffca8f979f47d8aa365747bd Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 14 Aug 2024 00:27:09 -0300 Subject: [PATCH 02/49] feat: ST7789 colors --- ESP_Code/DisplayHal.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 078cbb72..1c30a4bb 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -21,6 +21,12 @@ static byte msec[] = {0x0A, 0x15, 0x11, 0x06, 0x08, 0x04, 0x02, 0x0C}; #endif +#if defined(DISPLAY_ST7789) + // Define some colors + #define WHITE TFT_WHITE + #define BLACK TFT_BLACK +#endif + #if defined(DISPLAY_SSD1306) void drawStrMultiline(const char *msg, int xloc, int yloc) { //https://github.com/olikraus/u8g2/discussions/1479 From 2aae8318b208973777d322b601ed69a686854956 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 17 Aug 2024 13:24:07 -0300 Subject: [PATCH 03/49] feat: reset screen --- ESP_Code/DisplayHal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 1c30a4bb..75b0b5ab 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -88,6 +88,7 @@ #if defined(DISPLAY_ST7789) tft.begin(); tft.setRotation(1); + tft.init(); tft.fillScreen(BLACK); #endif } @@ -304,6 +305,7 @@ #endif #if defined(DISPLAY_ST7789) + tft.init(); tft.fillScreen(BLACK); tft.setTextColor(WHITE); From 5059b4961bb9986b33971d7429db3ad6dc4c2a87 Mon Sep 17 00:00:00 2001 From: Thomas Wenzlaff Date: Fri, 21 Mar 2025 18:29:43 +0100 Subject: [PATCH 04/49] Update README.md Add URL for Retrieving Duino-Coin Wallet Status via REST API and Displaying it on an OLED Display with ESP32 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7d8cf9b8..35219010 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [Home Assistant sensors package](https://github.com/mavotronik/Duinocoin_homeassistant) by mavotronik * [ESPGUITOOL](https://github.com/CGameDev/ESPGUITOOL) by kazutokirigaya * [DUCO Hashrate Monitor](https://gitlab.com/IT-Berater/twhashrate) hashrate java swing speedometer gui by IT-Berater + * [DUCO Wallet ESP32 Ticker](https://gitlab.com/IT-Berater/twesp32/-/blob/main/README-DUINO.md) Displaying Duino-Coin Wallet Status on an OLED Display with ESP32 by IT-Berater You may also view a similar list on the [website](https://duinocoin.com/apps). From a7f7e85ba9de55bd4aa5738350ccf4934081f360 Mon Sep 17 00:00:00 2001 From: tbwcjw <35520616+tbwcjw@users.noreply.github.com> Date: Wed, 21 May 2025 13:34:06 -0400 Subject: [PATCH 05/49] Added nxducominer to list of miners Added nxducominer to list of miners --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index adb28ebd..0a8be066 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - pure C miner by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez * [ducominer](https://github.com/its5Q/ducominer) by its5Q + * [nxducominer](https://github.com/tbwcjw/nxducominer/) - Miner for the Nintendo Switch by tbwcjw * [Unofficial miners directory](https://github.com/revoxhere/duino-coin/tree/master/Unofficial%20miners) * [Julia Miner](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Julia_Miner.jl) by revoxhere * [Ruby Miner](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Ruby_Miner.rb) by revoxhere From fc6dcec4afc664ea04c0cdaac1275d51bf6a91b7 Mon Sep 17 00:00:00 2001 From: Dmitry Gribenchuk Date: Wed, 10 Sep 2025 15:47:04 +0300 Subject: [PATCH 06/49] update AVR_Miner_langs.json for russian language Signed-off-by: Dmitry Gribenchuk --- Resources/AVR_Miner_langs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/AVR_Miner_langs.json b/Resources/AVR_Miner_langs.json index 1bb2db73..50a99750 100644 --- a/Resources/AVR_Miner_langs.json +++ b/Resources/AVR_Miner_langs.json @@ -520,8 +520,8 @@ "mining_not_exist_warning": " Убедитесь в том, что вы правильно ввели имя пользователя. Пожалуйста, проверьте ваш файл настроек. Пробуем еще раз через 10с", "load_config_error": " Ошибка загрузки файла настроек (", "load_config_error_warning": "/Miner_config.cfg). Попробуйте удалить его и перезапустить настройку. Выход через 10с", - "new_version": "A new version is available, you want to update miner [Y/n] ? ", - "updating": "The miner is outdated. Updating...." + "new_version": "Доступна новая версия, хотите обновить майнер [Y/n] ? ", + "updating": "Майнер устарел. Обновляю...." }, "spanish": { "translation_autor": "HGEpro", From 9fb42bdd14c34b994653f34f39446e5127d70582 Mon Sep 17 00:00:00 2001 From: profpandaa <30387483+profpandaa@users.noreply.github.com> Date: Wed, 22 Oct 2025 10:57:49 +0200 Subject: [PATCH 07/49] removed outdated nonceMiner from README translations --- Resources/README_TRANSLATIONS/README_id_ID.md | 1 - Resources/README_TRANSLATIONS/README_kr_KR.md | 1 - Resources/README_TRANSLATIONS/README_pl_PL.md | 1 - Resources/README_TRANSLATIONS/README_pt_BR.md | 1 - Resources/README_TRANSLATIONS/README_ru_RU.md | 1 - Resources/README_TRANSLATIONS/README_th_TH.md | 1 - Resources/README_TRANSLATIONS/README_tr_TR.md | 1 - Resources/README_TRANSLATIONS/README_zh_TW.md | 1 - 8 files changed, 8 deletions(-) diff --git a/Resources/README_TRANSLATIONS/README_id_ID.md b/Resources/README_TRANSLATIONS/README_id_ID.md index bfe5d02e..dc13880a 100644 --- a/Resources/README_TRANSLATIONS/README_id_ID.md +++ b/Resources/README_TRANSLATIONS/README_id_ID.md @@ -114,7 +114,6 @@ Setelah melakukan ini, Anda dapat meluncurkan perangkat lunak (cukup klik dua ka * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - Penambang MicroPython untuk papan modul ESP oleh fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python miner for Nintendo 3DS by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Penambang di Docker oleh Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Fastest Duino-Coin miner available by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - simple NodeJS miner by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - miner C murni oleh phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_kr_KR.md b/Resources/README_TRANSLATIONS/README_kr_KR.md index df6d7b3a..e3a49bb6 100644 --- a/Resources/README_TRANSLATIONS/README_kr_KR.md +++ b/Resources/README_TRANSLATIONS/README_kr_KR.md @@ -173,7 +173,6 @@ Duino-Coin 프로젝트에 대한 기여해 주시면 감사하겠습니다. * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - ESP 보드용 MicroPython 채굴기 by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Nintendo 3DS용 Python 채굴기 PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Docker 이용한 채굴기 by Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - 가장 빠른 Duino-Coin 채굴기 by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - 간단한 NodeJS 채굴기 by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - 퓨어 C 채굴기 by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_pl_PL.md b/Resources/README_TRANSLATIONS/README_pl_PL.md index 4b25a85b..da02ee51 100644 --- a/Resources/README_TRANSLATIONS/README_pl_PL.md +++ b/Resources/README_TRANSLATIONS/README_pl_PL.md @@ -113,7 +113,6 @@ Pakiet Duino-Coin dla AUR jest utrzymywany przez by [PhereloHD](https://github.c * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) by Alicia426 -* [nonceMiner](https://github.com/colonelwatch/nonceMiner) by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) by phantom32 * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_pt_BR.md b/Resources/README_TRANSLATIONS/README_pt_BR.md index 5243029d..97d202a8 100644 --- a/Resources/README_TRANSLATIONS/README_pt_BR.md +++ b/Resources/README_TRANSLATIONS/README_pt_BR.md @@ -165,7 +165,6 @@ O código-fonte do servidor, a documentação para chamadas de API e bibliotecas * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - Minerador em MicroPython para placas ESP, feito por fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Minerador em Python para Nintendo 3DS, feito por PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Mineradora em Docker, feito por Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - A mineradora de Duino-Coin mais rápida disponível, feita por colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - Minerador simples em NodeJS, feita pelo DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - Mineradora em C, feito por phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) por yippiez diff --git a/Resources/README_TRANSLATIONS/README_ru_RU.md b/Resources/README_TRANSLATIONS/README_ru_RU.md index 00273c7d..bd86f071 100644 --- a/Resources/README_TRANSLATIONS/README_ru_RU.md +++ b/Resources/README_TRANSLATIONS/README_ru_RU.md @@ -113,7 +113,6 @@ py -m pip install -r requirements.txt * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - MicroPython майнер для плат ESP от fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python майнер для Nintendo 3DS от PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Майнер в докере от Alicia426 -* [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Самый быстрый из доступных майнер от colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - Простой майнер NodeJS от DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - Майнер на чистом C от phantom32 & revox * [Go Miner](https://github.com/yippiez/go-miner) От yippiez diff --git a/Resources/README_TRANSLATIONS/README_th_TH.md b/Resources/README_TRANSLATIONS/README_th_TH.md index 9dde7ede..fc7a57e5 100644 --- a/Resources/README_TRANSLATIONS/README_th_TH.md +++ b/Resources/README_TRANSLATIONS/README_th_TH.md @@ -109,7 +109,6 @@ python3 -m pip install -r requirements.txt # Install pip dependencies * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - ตัวขุดไมโครไพธอนสำหรับบอร์ด ESP โดย fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - ตัวขุดไพธอนสำหรับ Nintendo 3DS โดย PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - ตัวขุดใน Docker โดย Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - ตัวขุด Duino-Coin อย่างเร็ว โดย colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - ตัวขุด NodeJS อย่างง่าย โดย DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - ตัวขุด pure C โดย phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) โดย yippiez diff --git a/Resources/README_TRANSLATIONS/README_tr_TR.md b/Resources/README_TRANSLATIONS/README_tr_TR.md index 4667e743..5dae3e0f 100644 --- a/Resources/README_TRANSLATIONS/README_tr_TR.md +++ b/Resources/README_TRANSLATIONS/README_tr_TR.md @@ -92,7 +92,6 @@ Bunu yaptıktan sonra istediğiniz yazılımı çalıştırabilirsiniz (istediğ * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - fabiopolancoe tarafından ESP kartları için MicroPython'da yazılmmış madenci * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - PhereloHD & HGEpro tarafından Nintendo 3DS için madenci yazılımı * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Alicia426 tarafından Docker içinde çalışan madenci - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - colonelwatch tarafından şu ana kadar ki en hızlı madenci yazılımı * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - DarkThinking tarafından basit bir NodeJS'de yazılmış madenci * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - phantom32 & revoxhere tarafından saf C içinde yazılmış madenci * [Go Miner](https://github.com/yippiez/go-miner) yippiez tarafından Go'da yazılmış madenci diff --git a/Resources/README_TRANSLATIONS/README_zh_TW.md b/Resources/README_TRANSLATIONS/README_zh_TW.md index e5b235b1..83febf0e 100644 --- a/Resources/README_TRANSLATIONS/README_zh_TW.md +++ b/Resources/README_TRANSLATIONS/README_zh_TW.md @@ -118,7 +118,6 @@ After doing this, you are good to go with launching the software (e.g. `python3 * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - MicroPython miner for ESP boards by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python miner for Nintendo 3DS by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Miner in Docker by Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Fastest Duino-Coin miner available by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - simple NodeJS miner by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - pure C miner by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez From 72dbd36017e3de3c1e53fbe5178bc5ea6d87cb0a Mon Sep 17 00:00:00 2001 From: profpandaa <30387483+profpandaa@users.noreply.github.com> Date: Thu, 23 Oct 2025 12:38:21 +0200 Subject: [PATCH 08/49] chore: changed README disclaimer above community softwares --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index adb28ebd..88116988 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r ## Community-made softwares -### Please note that these softwares are not developed by us and we do not give any guarantees that use of them will not result in an account getting banned if they get changed in the future. +### Please note that these softwares are not developed by us and we do not guarantee them working properly. Additionally note that using outdated and/or unofficial miners may produce warnings or a ban. ### Miners made by the Duino-Coin community: * [Dockerized Duino-Coin Miner](https://github.com/simeononsecurity/docker-duino-coin) - A Dockerized version of the Duino-Coin Miner by simeononsecurity From c5ef03dbf9fd4eebf9888ce9a1fff36ee264d118 Mon Sep 17 00:00:00 2001 From: Tech1k Date: Thu, 1 Jan 2026 21:42:36 -0700 Subject: [PATCH 09/49] Happy 2026 Duino miners! (increment copyright year) --- AVR_Miner.py | 4 ++-- Arduino_Code/Arduino_Code.ino | 2 +- PC_Miner.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 824086d2..caf81203 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official AVR Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2025 +Duino-Coin Team & Community 2019-2026 """ from os import _exit, mkdir @@ -805,7 +805,7 @@ def greeting(): + Style.BRIGHT + get_string('banner') + Style.RESET_ALL + Fore.MAGENTA + f' {Settings.VER}' + Fore.RESET - + ' 2019-2025') + + ' 2019-2026') print( Style.DIM + Fore.MAGENTA diff --git a/Arduino_Code/Arduino_Code.ino b/Arduino_Code/Arduino_Code.ino index 1947373e..5480bdcd 100644 --- a/Arduino_Code/Arduino_Code.ino +++ b/Arduino_Code/Arduino_Code.ino @@ -6,7 +6,7 @@ (____/(______)(____)(_)\_)(_____) \___)(_____)(____)(_)\_) Official code for Arduino boards (and relatives) version 4.3 - Duino-Coin Team & Community 2019-2024 © MIT Licensed + Duino-Coin Team & Community 2019-2026 © MIT Licensed https://duinocoin.com https://github.com/revoxhere/duino-coin If you don't know where to start, visit official website and navigate to diff --git a/PC_Miner.py b/PC_Miner.py index dc565fa4..c5c36494 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official PC Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2025 +Duino-Coin Team & Community 2019-2026 """ from time import time, sleep, strptime, ctime, time_ns @@ -825,7 +825,7 @@ def greeting(): print("\n" + Style.DIM + Fore.YELLOW + Settings.BLOCK + Fore.YELLOW + Style.BRIGHT + get_string("banner") + Style.RESET_ALL + Fore.MAGENTA + " (" + str(Settings.VER) + ") " - + Fore.RESET + "2019-2025") + + Fore.RESET + "2019-2026") print(Style.DIM + Fore.YELLOW + Settings.BLOCK + Style.NORMAL + Fore.YELLOW + "https://github.com/revoxhere/duino-coin") From 8885d0c3938e66e05271a97a33c5487aa79a9679 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:06:50 +0200 Subject: [PATCH 10/49] Version bump --- ESP_Code/Settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/Settings.h b/ESP_Code/Settings.h index 9defd714..05c3ddb2 100644 --- a/ESP_Code/Settings.h +++ b/ESP_Code/Settings.h @@ -115,7 +115,7 @@ extern const char PASSWORD[] = "PASSW0RD"; #define BLINK_SETUP_COMPLETE 2 #define BLINK_CLIENT_CONNECT 5 -#define SOFTWARE_VERSION "4.2" +#define SOFTWARE_VERSION "4.3" extern unsigned int hashrate = 0; extern unsigned int hashrate_core_two = 0; extern unsigned int difficulty = 0; From b45d3690e9eb866a426ccc56f64e8488324e0a71 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:07:16 +0200 Subject: [PATCH 11/49] Possible fix for #1813 --- ESP_Code/ESP_Code.ino | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index c2cac592..d6b0cfc0 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -3,7 +3,7 @@ ( _ \( )( )(_ _)( \( )( _ )___ / __)( _ )(_ _)( \( ) )(_) ))(__)( _)(_ ) ( )(_)((___)( (__ )(_)( _)(_ ) ( (____/(______)(____)(_)\_)(_____) \___)(_____)(____)(_)\_) - Official code for all ESP8266/32 boards version 4.2 + Official code for all ESP8266/32 boards version 4.3 Main .ino file The Duino-Coin Team & Community 2019-2024 © MIT Licensed @@ -235,9 +235,9 @@ namespace { Serial.println("WiFi reconnecting..."); #endif WiFi.disconnect(); - delay(200); + delay(500); WiFi.reconnect(); - delay(200); + delay(500); } #endif } @@ -363,6 +363,10 @@ namespace { #endif WiFi.begin(SSID, PASSWORD); + while(WiFi.status() != WL_CONNECTED) { + Serial.print("."); + delay(100); + } VerifyWifi(); #if !defined(ESP8266) @@ -629,7 +633,7 @@ void setup() { #endif WiFi.mode(WIFI_STA); // Setup ESP in client mode - WiFi.disconnect(true); + //WiFi.disconnect(true); #if defined(ESP8266) WiFi.setSleepMode(WIFI_NONE_SLEEP); #else @@ -689,6 +693,7 @@ void setup() { blinker.attach_ms(200, changeState); #endif wifiManager.autoConnect("Duino-Coin"); + delay(1000); VerifyWifi(); #if defined(BLUSHYBOX) blinker.detach(); From 2437e2f0eea5919f3b7fc972b6993fe5998a72f2 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:08:40 +0200 Subject: [PATCH 12/49] Update README.md --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index a2cf0a5c..970ae86e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ -

+

@@ -52,7 +52,7 @@ -

+ @@ -236,7 +236,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r ## License -Duino-Coin is mostly distributed under the MIT License. See the `LICENSE` file for more information. +Duino-Coin is mostly distributed under the MIT License. See the `LICENSE` file for more information.
Some third-party included files may have different licenses - please check their `LICENSE` statements (usually at the top of the source code files). @@ -253,17 +253,8 @@ Our disclaimer is available here:
dui ## Active project maintainers -* [@revoxhere](https://github.com/revoxhere/) - robik123.345@gmail.com (Lead Python dev, project founder) -* [@Bilaboz](https://github.com/bilaboz/) (Lead NodeJS dev) -* [@Tech1k](https://github.com/Tech1k/) - hello@kristiankramer.net (Lead Webmaster and DUCO Developer) -* [@ygboucherk](https://github.com/ygboucherk) ([wDUCO](https://github.com/ygboucherk/wrapped-duino-coin-v2) dev) - - - - - - -Big thanks to all the [contributors](https://github.com/revoxhere/duino-coin/graphs/contributors) that helped to develop the Duino-Coin project. +Originally created and maintained by [@revoxhere](https://github.com/revoxhere).
+Big thanks to all the [contributors](https://github.com/revoxhere/duino-coin/graphs/contributors) that helped to develop the Duino-Coin project.
Visit [duinocoin.com/team](https://duinocoin.com/team.html) to view more information about the Duino Team.
From 3d914b184ff38abd4afe72cf96de574fd59ae275 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:13:06 +0200 Subject: [PATCH 13/49] Fix http to https typo --- ESP_Code/ESP_Code.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index d6b0cfc0..9fa479e1 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -265,7 +265,7 @@ namespace { VerifyWifi(); #endif #if defined(DISPLAY_SSD1306) || defined(DISPLAY_16X2) || defined(DISPLAY_ST7789) - display_info(http.errorToString(httpCode)); + display_info(https.errorToString(httpCode)); #endif } https.end(); From 5b7fb595cb9257022d124eaecc86d0f33b3bb4a5 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:10:29 +0200 Subject: [PATCH 14/49] Update wallet string --- Resources/PC_Miner_langs.json | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Resources/PC_Miner_langs.json b/Resources/PC_Miner_langs.json index 63e225f1..362c1eb6 100644 --- a/Resources/PC_Miner_langs.json +++ b/Resources/PC_Miner_langs.json @@ -24,8 +24,8 @@ "basic_config_tool": "\nDuino-Coin basic configuration tool\nEdit ", "edit_config_file_warning": "/Miner_config.cfg file later if you want to change it.", "dont_have_account": "Don't have an Duino-Coin account yet? Use ", - "wallet": "Wallet", - "register_warning": " to register on server.\n", + "wallet": "https://wallet.duinocoin.com", + "register_warning": " to register on the network.\n", "ask_username": "Enter your Duino-Coin username: ", "ask_intensity": "Set mining intensity (1-100)% (recommended: 95): ", "ask_threads": "Set mining threads (recommended for your system: ", @@ -136,7 +136,7 @@ "basic_config_tool": "\nalat konfigurasi dasar Duino-Coin \nRubah ", "edit_config_file_warning": "file /Miner_config.cfg jika ingin merubahnya nanti.", "dont_have_account": "Belum memiliki akun Duino-Coin? Gunakan ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " untuk mendaftar ke server.\n", "ask_username": "Masukan username Duino-Coinmu: ", "ask_intensity": "Atur intensitas miningmu (1-100)% (direkomendasikan: 95): ", @@ -232,7 +232,7 @@ "basic_config_tool": "\nDuino-Coin 기본 도구\n", "edit_config_file_warning": "/Miner_config.cfg 파일을 변경하려면 나중에 편집 하세요.", "dont_have_account": "아직 Duino-Coin 계정이 없으신가요? ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": "을 사용해서 계정을 생성(register)하세요.\n", "ask_username": "Duino-Coin 사용자 이름을 입력하세요: ", "ask_intensity": "채굴 강도 설정 (1-100)% (추천 : 95): ", @@ -323,7 +323,7 @@ "basic_config_tool": "ابزار پیکربندی اولیه دوین کوین\n ویرایش ", "edit_config_file_warning": "/Miner_config.cfg اگر بعداًبخواهید آن را تغییر دهید.", "dont_have_account": "هنوز حساب دوین کوین ندارید؟ استفاده کنید", - "wallet": "حساب", + "wallet": "https://wallet.duinocoin.com", "register_warning": " برای ثبت نام در سرور.\n", "ask_username": " نام کاربری دوین کوین خود را وارد کنید: ", "ask_intensity": " تنظیم شدت استخراج (1-100)% (توصیه می شود: 95): ", @@ -414,7 +414,7 @@ "basic_config_tool": "\nZákladný konfiguračný nástroj Duino-Coin\nUpravte ", "edit_config_file_warning": "/Súbor Miner_config.cfg neskôr, ak ho chcete zmeniť.", "dont_have_account": "Ešte nemáte Duino-Coin účet? Použite ", - "wallet": "Peňaženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " na zaregistrovanie sa na serveri.\n", "ask_username": "Zadajte svoje používateľské meno Duino-Coin: ", "ask_intensity": "Nastaviť intenzitu ťažby (1 – 100) % (odporúčané: 95): ", @@ -505,7 +505,7 @@ "basic_config_tool": "\nStrumento base di configurazione Duino-Coin\nModifica ", "edit_config_file_warning": "/Miner_config.cfg più tardi se vuoi cambiarlo.", "dont_have_account": "Non hai ancora un account Duino-Coin? Usa ", - "wallet": "Portafoglio (Wallet)", + "wallet": "https://wallet.duinocoin.com", "register_warning": " per registrarti sul server.\n", "ask_username": "Inserisci il tuo nome utente di Duino-Coin: ", "ask_intensity": "Imposta l'intensità di mining (1-100)% (raccomandato: 95): ", @@ -578,8 +578,8 @@ "rig_identifier": "Identyfikator koparki: ", "basic_config_tool": "\nKreator pliku konfiguracyjnego Duino-Coin\nEdytuj plik ", "edit_config_file_warning": "/Miner_config.cfg jeżeli chcesz coś poźniej zmienić.", - "dont_have_account": "Nie posiadasz konta Duino-Coin? Użyj ", - "wallet": "Wallet (Portfel)", + "dont_have_account": "Nie posiadasz konta Duino-Coin? Wejdź na ", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby zarejestrować się na sieci.\n", "ask_username": "Wprowadź swoją nazwę użytkownika Duino-Coin: ", "ask_intensity": "Wprowadź intensywność kopania (1-100)% (zalecane: 95): ", @@ -685,7 +685,7 @@ "basic_config_tool": "\nBásica herramienta de configuración de Duino-Coin\nEdita ", "edit_config_file_warning": "el archivo /Miner_config.cfg después si quieres cambiar algo..", "dont_have_account": "No tienes una cuenta Duino-Coin todavía? Usa ", - "wallet": "Monedero", + "wallet": "https://wallet.duinocoin.com", "register_warning": " para registrarse en el servidor.\n", "ask_username": "Introduce tu usuario de Duino-Coin: ", "ask_intensity": "Ajusta la intensidad de minado (1-100)% (recomendado: 95): ", @@ -755,7 +755,7 @@ "basic_config_tool": "\nEditeur de configuration Duino-Coin\nEditez ", "edit_config_file_warning": "le fichier /Miner_config.cfg si vous voulez changer votre configuration ultérieurement.", "dont_have_account": "Vous n'avez pas encore de compte Duino-Coin ? Utilisez ", - "wallet": "Portefeuille", + "wallet": "https://wallet.duinocoin.com", "register_warning": " pour en créer un.\n", "ask_username": "Entrez votre nom d'utilisateur Duino-Coin : ", "ask_intensity": "Choisissez l'intensité de minage (1-100)% (recommandé: 95) : ", @@ -848,7 +848,7 @@ "basic_config_tool": "\nИнструмент базовой настройки Duino-Coin\nОтредактируйте файл ", "edit_config_file_warning": "/Miner_config.cfg если вы захотите их изменить.", "dont_have_account": "Еще нет аккаунта Duino-Coin? Используйте ", - "wallet": "Кошелек", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для регистрации на сервере.\n", "ask_username": "Введите ваше имя пользователя Duino-Coin: ", "ask_intensity": "Установите мощность майнинга (1-100)% (рекомендуется: 95): ", @@ -919,7 +919,7 @@ "basic_config_tool": "\nІнструмент базових налаштувань Duino-Coin\nВідредагуйте файл ", "edit_config_file_warning": "/Miner_config.cfg якщо ви захочете їх змінити.", "dont_have_account": "Ще немає акаунту Duino-Coin? Використовуйте ", - "wallet": "Гаманець", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для реєстрації на сервері.\n", "ask_username": "Введіть ім'я користувача Duino-Coin: ", "ask_intensity": "Встановіть потужність майнінгу (1-100)% (рекомендовано: 95): ", @@ -1015,7 +1015,7 @@ "basic_config_tool": "\nDuino-Coin simples Konfigurationstool\nBearbeite ", "edit_config_file_warning": "/Miner_config.cfg wenn du später Einstellungen verändern möchtest.", "dont_have_account": "Du hast noch keinen Duino-Coin Account? Benutze ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " um dich zu registrieren.\n", "ask_username": "Gib deinen Duino-Coin Nutzernamen ein: ", "ask_intensity": "Wie viel Prozent der Leistung soll Duino-Coin verwenden? (1-100)% (empfohlen: 95): ", @@ -1121,7 +1121,7 @@ "basic_config_tool": "\nDuino-Coin 基础配置工具\n编辑 ", "edit_config_file_warning": "/如果要更改 Miner_config.cfg 文件,请稍后。", "dont_have_account": "还没有Duino-Coin帐户吗? 使用 ", - "wallet": "钱包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在服务器上注册个。\n", "ask_username": "输入您的 Duino-Coin 用户名: ", "ask_intensity": "设定挖矿强度(1-100)%(建议:95): ", @@ -1192,7 +1192,7 @@ "basic_config_tool": "\nDuino-Coin 基本設定工具\n編輯 ", "edit_config_file_warning": "/如果要修改 Miner_config.cfg 文件,請稍等。", "dont_have_account": "還沒有Duino-Coin帳號嗎? 使用 ", - "wallet": "錢包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在伺服器上註冊。\n", "ask_username": "輸入您的 Duino-Coin 用户名稱: ", "ask_intensity": "設定挖礦難度(1-100)%(建議:95): ", @@ -1263,7 +1263,7 @@ "basic_config_tool": "\nDuino-Coin yapılandırma aracı\nDüzenleyin ", "edit_config_file_warning": "/Miner_config.cfg dosyasını eğer daha sonra değiştirmek istiyorsanız.", "dont_have_account": "Henüz bir Duino-Coin hesabınız yok mu? Kullanın ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": " sunucuya kayıt olmak için.\n", "ask_username": "Duino-Coin kullanıcı adınızı girin: ", "ask_intensity": "Madencilik gücünü seçin (1-100)% (önerilen: 95): ", @@ -1334,7 +1334,7 @@ "basic_config_tool": "\nFerramenta de configuração básica do Duino-Coin\nEdita ", "edit_config_file_warning": "Se você quiser trocar as configurações mais tarde /Miner_config.cfg é o arquivo.", "dont_have_account": "Você já tem uma conta no Duino-Coin? Se sim use-a.", - "wallet": "Carteira", + "wallet": "https://wallet.duinocoin.com", "register_warning": " Pare se registrar no servidor.\n", "ask_username": "Seu nome na Duino-Coin: ", "ask_intensity": "Intensidade da Mineração (1-100)% (recomendado: 95): ", @@ -1418,7 +1418,7 @@ "basic_config_tool": "\nWizard tal-Fajl tal-Konfigurazzjoni tad-Duino-Coin \nEdit File", "edit_config_file_warning": "/Miner_config.cfg jekk trid tibdel xi ħaġa aktar tard.", "dont_have_account": "M'għandekx kont Duino-Coin? Uża", - "wallet": "Kartiera (Kartiera)", + "wallet": "https://wallet.duinocoin.com", "register_warning": "biex tirreġistra fuq il-web. \n", "ask_username": "Daħħal l-username ta 'Duino-Coin tiegħek:", "ports_message": "Il-wizard tal-konfigurazzjoni sab il-portijiet li ġejjin:", @@ -1491,7 +1491,7 @@ "basic_config_tool": "\nDuino-Coin เครื่องมือการตั้งค่าพื้นฐาน\nแก้ไข ", "edit_config_file_warning": "ไฟล์ /Miner_config.cfg ภายหลังหากคุณต้องการเปลี่ยนแปลง", "dont_have_account": "ยังไม่มีบัญชี Duino-Coin? ใช้ ", - "wallet": "วอลเล็ท", + "wallet": "https://wallet.duinocoin.com", "register_warning": " เพื่อลงทะเบียนบนเซิร์ฟเวอร์\n", "ask_username": "ใส่ชื่อผู้ใช้ Duino-Coin: ", "ask_intensity": "ตั้งค่าความแรงในการขุดS (1-100)% (แนะนำ: 95): ", @@ -1582,7 +1582,7 @@ "basic_config_tool": "\nDuino-Coin बुनियादी विन्यास उपकरण\nपरिवर्तन ", "edit_config_file_warning": "/Miner_config.cfg बाद में फ़ाइल करें यदि आप इसे बदलना चाहते हैं.", "dont_have_account": "क्या आपके पास अभी तक डुइनो-कॉइन खाता नहीं है? इस का उपयोग करें ", - "wallet": "वॉलेट", + "wallet": "https://wallet.duinocoin.com", "register_warning": " सर्वर पर रजिस्टर करने के लिए।\n", "ask_username": "अपना डुइनो-कॉइन उपयोगकर्ता नाम दर्ज करें: ", "ask_intensity": "खनन तीव्रता (1-100)% सेट करें (अनुशंसित: 95): ", @@ -1678,7 +1678,7 @@ "basic_config_tool": "\nDuino-Coin základní konfigurační nástroj\nUprav ", "edit_config_file_warning": "/Miner_config.cfg soubor můžeš editovat později, pokud ho budeš chtít změnit.", "dont_have_account": "Ještě nemáš Duino-Coin účet? Použij ", - "wallet": "Peněženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " registruj se na serveru.\n", "ask_username": "Zadej své Duino-Coin uživatelské jméno: ", "ask_intensity": "Nastav intenzitu těžby (1-100)% (doporučeno: 95): ", @@ -1789,7 +1789,7 @@ "basic_config_tool": "\nDuino-Coin基本設定ツール\n編集 ", "edit_config_file_warning": "/Miner_config.cfgファイルを後で変更したい場合。", "dont_have_account": "をまだお持ちでない方はこちらを使用 ", - "wallet": "ウォレット", + "wallet": "https://wallet.duinocoin.com", "register_warning": " をクリックしてサーバーに登録します。\n", "ask_username": "Duino-Coinのユーザー名を入力します: ", "ask_intensity": "マイナー強度(1~100)%(推奨:95)を設定: ", @@ -1894,7 +1894,7 @@ "basic_config_tool": "\nDuino-Coin perusasetustyökalu\nMuokkaa ", "edit_config_file_warning": "/Miner_config.cfg -tiedostoa myöhemmin, jos haluat muuttaa asetuksia.", "dont_have_account": "Eikö sinulla ole vielä Duino-Coin-tiliä? Käytä ", - "wallet": "Lompakko", + "wallet": "https://wallet.duinocoin.com", "register_warning": " rekisteröityäksesi palvelimelle.\n", "ask_username": "Syötä Duino-Coin-käyttäjätunnuksesi: ", "ask_intensity": "Aseta louhintaintensiteetti (1-100)% (suositus: 95): ", From a76311cc6f900d2ea4c9b9213930a76c34f6ff1e Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:11:34 +0200 Subject: [PATCH 15/49] Update wallet string --- Resources/AVR_Miner_langs.json | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Resources/AVR_Miner_langs.json b/Resources/AVR_Miner_langs.json index c7fd5c43..1bb2db73 100644 --- a/Resources/AVR_Miner_langs.json +++ b/Resources/AVR_Miner_langs.json @@ -16,8 +16,8 @@ "basic_config_tool": "\nDuino-Coin basic configuration tool\nEdit ", "edit_config_file_warning": "/Miner_config.cfg file later if you want to change it.", "dont_have_account": "Don't have an Duino-Coin account yet? Use ", - "wallet": "Wallet", - "register_warning": " to register on server.\n", + "wallet": "https://wallet.duinocoin.com", + "register_warning": " to register on the network.\n", "ask_username": "Enter your Duino-Coin username: ", "ports_message": "Configuration tool has found the following ports:", "ports_notice": "If you can't see your board here, make sure the it is properly connected and the program has access to it (admin/sudo rights).", @@ -115,7 +115,7 @@ "basic_config_tool": "\nalat konfigurasi dasar Duino-Coin \nRubah ", "edit_config_file_warning": "file /Miner_config.cfg jika ingin merubahnya nanti.", "dont_have_account": "Belum memiliki akun Duino-Coin? Gunakan ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " untuk mendaftar ke server.\n", "ask_username": "Masukan username Duino-Coinmu: ", "ports_message": "Alat konfigurasi telah menemukan port berikut:", @@ -200,7 +200,7 @@ "basic_config_tool": "\nDuino-Coin základní konfigurační nástroj\nEdit ", "edit_config_file_warning": "/Miner_config.cfg soubor můžeš editovat později.", "dont_have_account": "Ještě nemáš Duino-Coin účet? Použij ", - "wallet": "Peněženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby ses registroval se na serveru.\n", "ask_username": "Zadej své Duino-Coin uživatelské jméno: ", "ports_message": "Konfigurační nástroj našel desky na následujících portech:", @@ -299,7 +299,7 @@ "basic_config_tool": "\nDuino-Coin 기본 도구\n", "edit_config_file_warning": "/Miner_config.cfg 파일을 변경하려면 나중에 편집 하십시오.", "dont_have_account": "아직 Duino-Coin 계정이 없으신가요?", - "wallet": " Wallet", + "wallet": " https://wallet.duinocoin.com", "register_warning": "을 사용해서 계정을 생성(register)하세요.\n", "ask_username": "Duino-Coin 사용자 이름 입력하세요: ", "ports_message": "도구에서 다음 포트를 찾았습니다:", @@ -379,8 +379,8 @@ "rig_identifier": "Identyfikator koparki: ", "basic_config_tool": "\nKreator pliku konfiguracyjnego Duino-Coin\nEdytuj plik ", "edit_config_file_warning": "/Miner_config.cfg jeżeli chcesz coś poźniej zmienić.", - "dont_have_account": "Nie posiadasz konta Duino-Coin? Użyj ", - "wallet": "Wallet (Portfel)", + "dont_have_account": "Nie posiadasz konta Duino-Coin? Wejdź na ", + "wallet": "https://wallet.duinocoin.com", "register_warning": " aby zarejestrować się na sieci.\n", "ask_username": "Wprowadź swoją nazwę użytkownika Duino-Coin: ", "ports_message": "Kreator konfiguracji znalazł następujące porty:", @@ -475,7 +475,7 @@ "basic_config_tool": "\nИнструмент базовой настройки Duino-Coin\nОтредактируйте файл ", "edit_config_file_warning": "/Miner_config.cfg если вы захотите их изменить.", "dont_have_account": "Еще нет аккаунта Duino-Coin? Используйте ", - "wallet": "Кошелек", + "wallet": "https://wallet.duinocoin.com", "register_warning": " для регистрации на сервере.\n", "ask_username": "Введите ваше имя пользователя Duino-Coin: ", "ports_message": "Инструмент настройки нашел следующие порты:", @@ -540,7 +540,7 @@ "basic_config_tool": "\nHerramienta de configuración básica de Duino-Coin\nEdita ", "edit_config_file_warning": "el archivo /Miner_config.cfg si deseas cambiar después la configuración.", "dont_have_account": "¿No tienes una cuenta Duino-Coin todavía? Usa ", - "wallet": "Monedero", + "wallet": "https://wallet.duinocoin.com", "register_warning": " para registrarte en el servidor.\n", "ask_username": "Introduce tu usuario Duino-Coin: ", "ports_message": "La herramienta de configuración ha descubierto estos puertos:", @@ -605,7 +605,7 @@ "basic_config_tool": "\nDuino-Coin simples Konfigurationstool\nBearbeite ", "edit_config_file_warning": "/Miner_config.cfg wenn du Einstellungen ändern möchtest.", "dont_have_account": "Du hast noch keinen Duino-Coin Account? Benutze ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " um dich zu registrieren.\n", "ask_username": "Gib deinen Duino-Coin Benutzernamen ein: ", "ports_message": "Das Konfigurationstool hat Arduinos auf folgenden Ports gefunden:", @@ -704,7 +704,7 @@ "basic_config_tool": "\nEditeur de configuration Duino-Coin\nEditez ", "edit_config_file_warning": "le fichier /Miner_config.cfg si vous voulez changer votre configuration ultérieurement.", "dont_have_account": "Vous n'avez pas encore de compte Duino-Coin? Utilisez ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " pour en créer un.\n", "ask_username": "Entrez votre nom d'utilisateur Duino-Coin: ", "ports_message": "L'outil de configuration a trouvé les ports suivants:", @@ -770,7 +770,7 @@ "basic_config_tool": "\nDuino-Coin základne nastavenie\nEdit ", "edit_config_file_warning": "/Miner_config.cfg súbor neskôr pre zmenu.", "dont_have_account": "Nemáš Duino-Coin účet? Použi ", - "wallet": "Peňaženka", + "wallet": "https://wallet.duinocoin.com", "register_warning": " na zaregistrovanie na serveri.\n", "ask_username": "Zadaj svoje Duino-Coin meno: ", "ports_message": "Nástroj našiel na nasledujúcich portoch:", @@ -835,7 +835,7 @@ "basic_config_tool": "\nStrumento base di configurazione Duino-Coin\nModifica ", "edit_config_file_warning": "/Miner_config.cfg più tardi se vuoi cambiarlo.", "dont_have_account": "Non hai ancora un account Duino-Coin? Usa ", - "wallet": "Portafoglio (Wallet)", + "wallet": "https://wallet.duinocoin.com", "register_warning": " per registrarti sul server.\n", "ask_username": "Inserisci il tuo nome utente di Duino-Coin: ", "ports_message": "Lo strumento di configurazione ha trovato le seguenti porte:", @@ -902,7 +902,7 @@ "basic_config_tool": "\nDuino-Coin 基础配置工具\n编辑 ", "edit_config_file_warning": "/如果要更改 Miner_config.cfg 文件,请稍后。", "dont_have_account": "还没有Duino-Coin帐户吗? 使用 ", - "wallet": "钱包", + "wallet": "https://wallet.duinocoin.com", "register_warning": " 在服务器上注册个。\n", "ask_username": "输入您的 Duino-Coin 用户名: ", "ports_message": "配置工具找到了如下端口:", @@ -969,7 +969,7 @@ "basic_config_tool": "\nFerramenta de configuração básica do Duino-Coin\nEdita ", "edit_config_file_warning": "Se você quiser trocar as configurações mais tarde /Miner_config.cfg é o arquivo.", "dont_have_account": "Você já tem uma conta no Duino-Coin? Se sim use-a.", - "wallet": "Carteira", + "wallet": "https://wallet.duinocoin.com", "register_warning": " Para se registrar no servidor.\n", "ask_username": "Seu nome na Duino-Coin: ", "ports_message": "Duranta a configuração foram descobertas essas portas:", @@ -1050,7 +1050,7 @@ "basic_config_tool": "\nDuino-Coin yapılandırma aracı\nEğer daha sonra ayarları değiştirmek isterseniz ", "edit_config_file_warning": "/Miner_config.cfg dosyasını düzenleyin.", "dont_have_account": "Henüz bir Duino-Coin hesabınız yok mu? ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": " ile sunucuya kayıt olun.", "ask_username": "Duino-Coin kullanıcı adınızı girin: ", "ports_message": "Yapılandırma aracı belirtilen portları buldu:", @@ -1133,7 +1133,7 @@ "basic_config_tool": "\nDuino-Coin konfiqurasiya aracı\nAyarları daha sonra dəyişdirmək istəyirsinizsə", "edit_config_file_warning": "/Miner_config faylını dəyişdirin.", "dont_have_account": "Hələ Duino-Coin hesabınız yoxdur? ", - "wallet": "Cüzdan", + "wallet": "https://wallet.duinocoin.com", "register_warning": "ilə serverdə qeydiyyatdan keçin.", "ask_username": "Duino-Coin istifadəçi adınızı daxil edin: ", "ports_message": "Konfiqurasiya vasitəsi göstərilən portları tapdı:", @@ -1199,7 +1199,7 @@ "basic_config_tool": "\nDuino-Coin เครื่องมือการตั้งค่าพื้นฐาน\nแก้ไข ", "edit_config_file_warning": "ไฟล์ /Miner_config.cfg ภายหลังหากคุณต้องการแก้ไข", "dont_have_account": "ยังไม่มีบัญชี Duino-Coin ใช้งาน? ใช้ ", - "wallet": "วอลเล็ท", + "wallet": "https://wallet.duinocoin.com", "register_warning": " ลงทะเบียนบนเซิร์ฟเวอร์\n", "ask_username": "ใส่ชื่อผู้ใช้งาน Duino-Coin ของคุณ: ", "ports_message": "เครื่องมือการตั้งค่าถูกพบที่พอร์ตต่อไปนี้:", @@ -1280,7 +1280,7 @@ "basic_config_tool": "\nDuino-Coin basis configuratiehulpprogramma\nBewerk ", "edit_config_file_warning": "het bestand /Miner_config.cfg later.", "dont_have_account": "Nog geen Duino-Coin account? Ga naar ", - "wallet": "Wallet", + "wallet": "https://wallet.duinocoin.com", "register_warning": " voor het registeren van een account.\n", "ask_username": "Vul je Duino-Coin gebruikersnaam in: ", "ports_message": "Het configuratiehulpprogramma heeft de volgende poorten gevonden:", @@ -1361,7 +1361,7 @@ "basic_config_tool": "\nDuino-Coin基本設定ツール\n編集 ", "edit_config_file_warning": "/Miner_config.cfgファイルを後で変更したい場合。", "dont_have_account": "をまだお持ちでない方はこちらを使用 ", - "wallet": "ウォレット", + "wallet": "https://wallet.duinocoin.com", "register_warning": " をクリックしてサーバーに登録します。\n", "ask_username": "Duino-Coinのユーザー名を入力します: ", "ports_message": "コンフィグレーションツールは、以下のポートを検出しました:", @@ -1455,7 +1455,7 @@ "basic_config_tool": "\nDuino-Coinin perusasetusten työkalu\nMuokkaa ", "edit_config_file_warning": "/Miner_config.cfg-tiedostoa myöhemmin, jos haluat muuttaa sitä.", "dont_have_account": "Eikö sinulla ole vielä Duino-Coin-tiliä? Käytä ", - "wallet": "Lompakko", + "wallet": "https://wallet.duinocoin.com", "register_warning": " rekisteröityäksesi palvelimelle.\n", "ask_username": "Syötä Duino-Coin-käyttäjätunnuksesi: ", "ports_message": "Asetustyökalu on löytänyt seuraavat portit:", From 1dde2fc895d0194ef623378de5626c5e36ef7127 Mon Sep 17 00:00:00 2001 From: JK-Rolling <89238608+JK-Rolling@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:15:17 +0800 Subject: [PATCH 16/49] feed wdt when waiting for server response --- ESP_Code/MiningJob.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ESP_Code/MiningJob.h b/ESP_Code/MiningJob.h index bb200914..be205211 100644 --- a/ESP_Code/MiningJob.h +++ b/ESP_Code/MiningJob.h @@ -266,7 +266,7 @@ class MiningJob { void waitForClientData() { client_buffer = ""; - + unsigned int stopWatch = millis(); while (client.connected()) { if (client.available()) { client_buffer = client.readStringUntil(END_TOKEN); @@ -274,6 +274,13 @@ class MiningJob { client_buffer = "???\n"; // NOTE: Should never happen break; } + if (max_micros_elapsed(micros(), 100000)) { + handleSystemEvents(); + } + if (millis()-stopWatch>120000) { + Serial.println("Timeout after 120s. Forced restart.."); + ESP.restart(); + } } } @@ -301,7 +308,9 @@ class MiningJob { " share #" + String(share_count) + " (" + String(counter) + ")" + " hashrate: " + String(hashrate / 1000, 2) + " kH/s (" + - String(elapsed_time_s) + "s)\n"); + String(elapsed_time_s) + "s) " + + "Ping: " + String(ping) + "ms " + + "(" + node_id + ")\n"); #endif } From 499c5239d00d4d3584fc68eb8b373fc88f50089d Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Sun, 1 Dec 2024 15:27:05 +0100 Subject: [PATCH 17/49] Fix a slow memory leak (fixed list size) --- AVR_Miner.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index e242ce3b..0273ee09 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Duino-Coin Official AVR Miner 4.2 © MIT licensed +Duino-Coin Official AVR Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin Duino-Coin Team & Community 2019-2024 @@ -27,6 +27,7 @@ from datetime import datetime from statistics import mean from signal import SIGINT, signal +from collections import deque from time import ctime, sleep, strptime, time import pip @@ -109,7 +110,7 @@ def port_num(com): class Settings: - VER = '4.2' + VER = '4.3' SOC_TIMEOUT = 15 REPORT_TIME = 120 AVR_TIMEOUT = 10 @@ -467,8 +468,8 @@ def start(donation_level): shares = [0, 0, 0] -hashrate_mean = [] -ping_mean = [] +hashrate_mean = deque(maxlen=25) +ping_mean = deque(maxlen=25) diff = 0 donator_running = False job = '' @@ -1178,7 +1179,7 @@ def mine_avr(com, threadid, fastest_pool, thread_rigid): hashrate_t = round(num_res / computetime, 2) hashrate_mean.append(hashrate_t) - hashrate = mean(hashrate_mean[-5:]) + hashrate = mean(hashrate_mean) hashrate_list[threadid] = hashrate total_hashrate = sum(hashrate_list) except Exception as e: @@ -1208,7 +1209,7 @@ def mine_avr(com, threadid, fastest_pool, thread_rigid): time_delta = (responsetimestop - responsetimetart).microseconds ping_mean.append(round(time_delta / 1000)) - ping = mean(ping_mean[-10:]) + ping = mean(ping_mean) diff = get_prefix("", int(diff), 0) debug_output(com + f': retrieved feedback: {" ".join(feedback)}') except Exception as e: From 90fe73dfd843d6479791ff2cf9eb4f0af9e8be54 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:40:33 +0100 Subject: [PATCH 18/49] Update Arduino_Code.ino --- Arduino_Code/Arduino_Code.ino | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Arduino_Code/Arduino_Code.ino b/Arduino_Code/Arduino_Code.ino index 1b6836ff..1947373e 100644 --- a/Arduino_Code/Arduino_Code.ino +++ b/Arduino_Code/Arduino_Code.ino @@ -4,7 +4,7 @@ ( _ \( )( )(_ _)( \( )( _ )___ / __)( _ )(_ _)( \( ) )(_) ))(__)( _)(_ ) ( )(_)((___)( (__ )(_)( _)(_ ) ( (____/(______)(____)(_)\_)(_____) \___)(_____)(____)(_)\_) - Official code for Arduino boards (and relatives) version 4.2 + Official code for Arduino boards (and relatives) version 4.3 Duino-Coin Team & Community 2019-2024 © MIT Licensed https://duinocoin.com @@ -20,6 +20,8 @@ for default settings use -O0. -O may be a good tradeoff between both */ #ifndef LED_BUILTIN #define LED_BUILTIN 13 #endif +#define SEP_TOKEN "," +#define END_TOKEN "\n" /* For 8-bit microcontrollers we should use 16 bit variables since the difficulty is low, for all the other cases should be 32 bits. */ #if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR) @@ -126,7 +128,7 @@ void loop() { uintDiff difficulty = strtoul(Serial.readStringUntil(',').c_str(), NULL, 10); // Clearing the receive buffer reading one job. while (Serial.available()) Serial.read(); - // Turn on the built-in led + // Turn off the built-in led #if defined(ARDUINO_ARCH_AVR) PORTB = PORTB | B00100000; #else @@ -154,9 +156,9 @@ void loop() { // Send result back to the program with share time Serial.print(String(ducos1result, 2) - + "," + + SEP_TOKEN + String(elapsedTime, 2) - + "," + + SEP_TOKEN + String(DUCOID) - + "\n"); + + END_TOKEN); } From 7183d039f6315d940e446799a1cb51e9ff3f4553 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:57:20 +0100 Subject: [PATCH 19/49] Update duco_hash.cpp --- Arduino_Code/duco_hash.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Arduino_Code/duco_hash.cpp b/Arduino_Code/duco_hash.cpp index f5d1cc16..48113816 100644 --- a/Arduino_Code/duco_hash.cpp +++ b/Arduino_Code/duco_hash.cpp @@ -77,9 +77,7 @@ void duco_hash_block(duco_hash_state_t * hasher) { } void duco_hash_init(duco_hash_state_t * hasher, char const * prevHash) { - for (uint8_t i = 0; i < 40; i++) { - hasher->buffer[i] = prevHash[i]; - } + memcpy(hasher->buffer, prevHash, 40); if (prevHash == (void*)(0xffffffff)) { // NOTE: THIS IS NEVER CALLED From 07a949cdb11660f157dde51c6b2bd49f1d77309c Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:08:57 +0100 Subject: [PATCH 20/49] Changed default timeouts and fixed wrong mining key error --- AVR_Miner.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 0273ee09..204dea91 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -111,8 +111,8 @@ def port_num(com): class Settings: VER = '4.3' - SOC_TIMEOUT = 15 - REPORT_TIME = 120 + SOC_TIMEOUT = 10 + REPORT_TIME = 300 AVR_TIMEOUT = 10 BAUDRATE = 115200 DATA_DIR = "Duino-Coin AVR Miner " + str(VER) @@ -291,6 +291,7 @@ def check_mining_key(user_settings): + key, timeout=10 ).json() + debug_output(response) if response["success"] and not response["has_key"]: # if the user doesn't have a mining key user_settings["mining_key"] = "None" @@ -305,6 +306,10 @@ def check_mining_key(user_settings): return if not response["success"]: + if response["message"] == "Too many requests": + debug_output("Skipping mining key check - getting 429") + return + if user_settings["mining_key"] == "None": pretty_print( "sys0", @@ -748,10 +753,10 @@ def load_config(): 'language': lang, 'identifier': rig_identifier, 'debug': 'n', - "soc_timeout": 45, + "soc_timeout": 10, "avr_timeout": 10, "discord_presence": "y", - "periodic_report": 60, + "periodic_report": 300, "mining_key": mining_key} with open(str(Settings.DATA_DIR) From 5c067e62765f3d684c9eb62f487769decc5d7630 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:25:12 +0100 Subject: [PATCH 21/49] Improved printlock and mining key check failsafes --- PC_Miner.py | 88 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/PC_Miner.py b/PC_Miner.py index 2d728844..87a22e47 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Duino-Coin Official PC Miner 4.2 © MIT licensed +Duino-Coin Official PC Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin Duino-Coin Team & Community 2019-2024 @@ -12,7 +12,7 @@ from multiprocessing import cpu_count, current_process from multiprocessing import Process, Manager, Semaphore -from threading import Thread +from threading import Thread, Lock from datetime import datetime from random import randint @@ -42,8 +42,10 @@ import io +debug = "n" running_on_rpi = False configparser = ConfigParser() +printlock = Lock() # Python <3.5 check f"Your Python version is too old. Duino-Coin Miner requires version 3.6 or above. Update your packages and try again" @@ -78,6 +80,13 @@ def handler(signal_received, frame): shell=True, stdout=PIPE) +def debug_output(text: str): + if debug == 'y': + print(Style.RESET_ALL + Fore.WHITE + + now().strftime(Style.DIM + '%H:%M:%S.%f ') + + Style.NORMAL + f'DEBUG: {text}') + + def install(package): """ Automatically installs python pip package and restarts the program @@ -142,7 +151,7 @@ class Settings: """ ENCODING = "UTF8" SEPARATOR = "," - VER = 4.2 + VER = 4.3 DATA_DIR = "Duino-Coin PC Miner " + str(VER) TRANSLATIONS = ("https://raw.githubusercontent.com/" + "revoxhere/" @@ -152,11 +161,12 @@ class Settings: SETTINGS_FILE = "/Settings.cfg" TEMP_FOLDER = "Temp" - SOC_TIMEOUT = 20 - REPORT_TIME = 5*60 + SOC_TIMEOUT = 10 + REPORT_TIME = 300 DONATE_LVL = 0 RASPI_LEDS = "y" RASPI_CPU_IOT = "y" + disable_title = False try: # Raspberry Pi latin encoding users can't display this character @@ -181,24 +191,26 @@ class Settings: def title(title: str): - if osname == 'nt': - """ - Changing the title in Windows' cmd - is easy - just use the built-in - title command - """ - ossystem('title ' + title) - else: - """ - Most *nix terminals use - this escape sequence to change - the console window title - """ - try: - print('\33]0;' + title + '\a', end='') - sys.stdout.flush() - except Exception as e: - debug_output("Error setting title: " +str(e)) + if not Settings.disable_title: + if osname == 'nt': + """ + Changing the title in Windows' cmd + is easy - just use the built-in + title command + """ + ossystem('title ' + title) + else: + """ + Most *nix terminals use + this escape sequence to change + the console window title + """ + try: + print('\33]0;' + title + '\a', end='') + sys.stdout.flush() + except Exception as e: + debug_output("Error setting title: " +str(e)) + Settings.disable_title = True def check_updates(): @@ -695,9 +707,10 @@ def print_queue_handler(print_queue): while True: if len(print_queue): message = print_queue[0] - del print_queue[0] - print(message) - sleep(0.1) + with printlock: + print(message) + print_queue.pop(0) + sleep(0.01) def get_string(string_name): @@ -713,12 +726,16 @@ def get_string(string_name): def has_mining_key(username): - response = requests.get( - "https://server.duinocoin.com/mining_key" - + "?u=" + username, - timeout=10 - ).json() - return response["has_key"] + try: + response = requests.get( + "https://server.duinocoin.com/mining_key" + + "?u=" + username, + timeout=10 + ).json() + return response["has_key"] + except Exception as e: + debug_output("Error checking for mining key: " + str(e)) + return False def check_mining_key(user_settings): @@ -733,6 +750,7 @@ def check_mining_key(user_settings): + key, timeout=Settings.SOC_TIMEOUT ).json() + debug_output(response) if response["success"] and not response["has_key"]: # If user doesn't have a mining key @@ -747,6 +765,9 @@ def check_mining_key(user_settings): return if not response["success"]: + if response["message"] == "Too many requests": + debug_output("Skipping mining key check - getting 429") + return if user_settings["mining_key"] == "None": pretty_print(get_string("mining_key_required"), "warning") mining_key = input("\t\t" + get_string("ask_mining_key") @@ -1197,8 +1218,7 @@ def mine(id: int, user_settings: list, + f"{single_miner_id}") time_start = time() - feedback = Client.recv( - ).split(Settings.SEPARATOR) + feedback = Client.recv().split(Settings.SEPARATOR) ping = (time() - time_start) * 1000 if feedback[0] == "GOOD": From 1577ea9582fa29671a5dfab6cba937165bad10de Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:26:28 +0100 Subject: [PATCH 22/49] Better printlock and set title failsafes --- AVR_Miner.py | 55 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 204dea91..43c93297 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -32,14 +32,11 @@ import pip from subprocess import DEVNULL, Popen, check_call, call -from threading import Thread -from threading import Lock as thread_lock -from threading import Semaphore - +from threading import Thread, Lock import base64 as b64 - import os -printlock = Semaphore(value=1) + +printlock = Lock() # Python <3.5 check @@ -119,6 +116,7 @@ class Settings: SEPARATOR = "," ENCODING = "utf-8" TEMP_FOLDER = "Temp" + disable_title = False try: # Raspberry Pi latin users can't display this character @@ -600,24 +598,26 @@ def debug_output(text: str): def title(title: str): - if osname == 'nt': - """ - Changing the title in Windows' cmd - is easy - just use the built-in - title command - """ - ossystem('title ' + title) - else: - """ - Most *nix terminals use - this escape sequence to change - the console window title - """ - try: - print('\33]0;' + title + '\a', end='') - sys.stdout.flush() - except Exception as e: - debug_output("Error setting title: " +str(e)) + if not Settings.disable_title: + if osname == 'nt': + """ + Changing the title in Windows' cmd + is easy - just use the built-in + title command + """ + ossystem('title ' + title) + else: + """ + Most *nix terminals use + this escape sequence to change + the console window title + """ + try: + print('\33]0;' + title + '\a', end='') + sys.stdout.flush() + except Exception as e: + debug_output("Error setting title: " +str(e)) + Settings.disable_title = True def handler(signal_received, frame): @@ -1318,9 +1318,10 @@ def print_queue_handler(): while True: if len(print_queue): message = print_queue[0] - del print_queue[0] - print(message) - sleep(0.1) + with printlock: + print(message) + print_queue.pop(0) + sleep(0.01) if __name__ == '__main__': From 4b4ba050ebe4d754e2ef29041f3caa7df370bd3e Mon Sep 17 00:00:00 2001 From: Leith Cullen <909007+ZL1LAC@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:24:35 +1300 Subject: [PATCH 23/49] Update README.md ESPGUITOOL by kazutokirigaya --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 970ae86e..96c96828 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [Duino Lookup](https://axorax.github.io/duino-lookup/) by axorax * [Duino Miner Hassio Add-on](https://github.com/mavotronik/hassio-addons/tree/main/duino_miner_hassio_addon) by mavotronik * [Home Assistant sensors package](https://github.com/mavotronik/Duinocoin_homeassistant) by mavotronik + * [ESPGUITOOL](https://github.com/CGameDev/ESPGUITOOL) by kazutokirigaya You may also view a similar list on the [website](https://duinocoin.com/apps). From ffc426991959f06b57e0683b805a412277a3ed90 Mon Sep 17 00:00:00 2001 From: tommarek <80095089+tommarekCZE@users.noreply.github.com> Date: Fri, 6 Dec 2024 23:17:06 +0100 Subject: [PATCH 24/49] Update README_cz_CZ.md Removed GPU support info and fixed the MCU translation + SBCs --- Resources/README_TRANSLATIONS/README_cz_CZ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/README_TRANSLATIONS/README_cz_CZ.md b/Resources/README_TRANSLATIONS/README_cz_CZ.md index 5f0b6a9b..9461eff3 100644 --- a/Resources/README_TRANSLATIONS/README_cz_CZ.md +++ b/Resources/README_TRANSLATIONS/README_cz_CZ.md @@ -59,7 +59,7 @@

- Duino-Coin je mince, kterou je možné těžit za pomocí desek Arduino, ESP8266/32, jednodeskových počítačů Raspberry Pi, stolních počítačů a mnoha dalšího (včetně Wi-Fi routerů, chytrých televizí, chytrých telefonů, hodinek, čipů SBC a MCU nebo dokonce grafických karet). + Duino-Coin je mince, kterou je možné těžit za pomocí desek Arduino, ESP8266/32, Raspberry Pi, stolních počítačů a mnoha dalšího (včetně Wi-Fi routerů, chytrých televizí, chytrých telefonů, hodinek, jednodeskových počítačů SBCs a ostatních mikrokontrolérů).

From c48a7579a5770b52ebe58d67eb3678745b5e4859 Mon Sep 17 00:00:00 2001 From: kaytipooficial Date: Fri, 6 Dec 2024 21:05:38 +0100 Subject: [PATCH 25/49] Updated es_LATAM readme --- .../README_TRANSLATIONS/README_es_LATAM.md | 95 ++++++++++--------- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/Resources/README_TRANSLATIONS/README_es_LATAM.md b/Resources/README_TRANSLATIONS/README_es_LATAM.md index c312eb6b..0e3c22d5 100644 --- a/Resources/README_TRANSLATIONS/README_es_LATAM.md +++ b/Resources/README_TRANSLATIONS/README_es_LATAM.md @@ -2,7 +2,7 @@ *** Official Duino Coin LATAM README *** by revoxhere, 2019-2022 *** translated by Technopy311 -*** Last update by Erick2317 +*** Last update by kaytipooficial -->
@@ -137,42 +137,54 @@ Cualquier contribución que haces al proyecto de Duino-Coin son gratamente aprec El código fuente del servidor, documentación para las peticiones a la API y librerías oficiales para desarrollar tus propias apps para Duino-Coin están disponibles están disponibles en la rama de [herramientas útiles](https://github.com/revoxhere/duino-coin/tree/useful-tools) -## Pruebas de rendimiento de dispositivos y placas probados oficialmente +## Version 4.0 objetivo de recompensas -### Ten en cuenta que las recompensas dependen de muchos factores y la tabla de abajo es solo para propositos de orientación. +Capturado con un multiplicador normal (no multiplicador de fin de semana) +| Dispositivo | Hashrate | Hilos | DUCO/día | Potencia usada | +|--------------------------------|------------------------|---------|----------|----------------| +| Arduino | 343 H/s | 1 | 12 | <0.5 W +| ESP32 | 170-180 kH/s | 2 | 10 | 1.5-2 W +| ESP32-S2/C3 | 85-96 kH/s | 1 | 8 | 1-1.5 W +| ESP8266 | 66 kH/s | 1 | 6 | 1-1.5 W +| Raspberry Pi 4 (Bajo) | 1 MH/s (no hash rápido)| 4 | 6-7 | 6.5 W +| Raspberry Pi 4 (Medio) | 5.4 MH/s (has rápido) | 4 | 7-8 | 6.5 W +| Computadores de bajos recursos | | 4 | 4-6 | - +| Computadores de medios recursos| | 4-8 | 6-10 | - +| Computadores de altos recursos | | 8+ | 10-12 | - + +
+ Otros dispositivos testeados y sus benchmarks - | Dispositivo/CPU/SBC/MCU/chip | Hashrate promedio
(todos los hilos) | Hilos de
minado | Consumo de
energía | Promedio
DUCO/día | - |-----------------------------------------------------------|-----------------------------------|-------------------|----------------|---------------------| - | Arduino Pro Mini, Uno, Nano etc.
(Atmega 328p/pb/16u2) | 258 H/s | 1 | 0.2 W | 15-20 | - | Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | 10 | - | Teensy 4.1 (soft cryptography) | 80 kH/s | 1 | 0.5 W | ? | - | NodeMCU, Wemos D1 etc.
(ESP8266) | 9-10 kH/s (160MHz) 5 kH/s (80Mhz) | 1 | 0.6 W | 3-6 | - | ESP32 | 40-42 kH/s | 2 | 1 W | 6-9 | - | Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | ? | - | Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | 4-5 | - | Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | ? | - | Raspberry Pi 4 **(64bit, fasthash)** | 6.8 MH/s | 4 | 6.4 W | 5 | - | ODROID XU4 | 1.0 MH/s | 8 | 5 W | 6 | - | Atomic Pi | 690 kH/s | 4 | 6 W | ? | - | Orange Pi Zero 2 | 740 kH/s | 4 | 2.55 W | ? | - | Khadas Vim 2 Pro | 1.12 MH/s | 8 | 6.2 W | ? | - | Libre Computers Tritium H5CC | 480 kH/s | 4 | 5 W | ? | - | Libre Computers Le Potato | 410 kH/s | 4 | 5 W | ? | - | Pine64 ROCK64 | 640 kH/s | 4 | 5 W | ? | - | Intel Celeron G1840 | 1.25 MH/s | 2 | 53 W | 3.3 | - | Intel Core i5-2430M | 1.18 MH/s | 4 | 35 W | 6.5 | - | Intel Core i5-3230M | 1.52 MH/s | 4 | 35 W | 7.2 | - | Intel Core i5-5350U | 1.35 MH/s | 4 | 15 W | 6.0 | - | Intel Core i5-7200U | 1.62 MH/s | 4 | 15 W | 7.5 | - | Intel Core i5-8300H | 3.67 MH/s | 8 | 45 W | 9.1 | - | Intel Core i3-4130 | 1.45 MH/s | 4 | 54 W | 3.7 | - | AMD Ryzen 5 2600 | 4.9 MH/s | 12 | 65 W | 15.44 | - | AMD Ryzen R1505G **(fasthash)** | 8.5 MH/s | 4 | 35 W | - | - | Intel Core i7-11370H **(fasthash)** | 17.3 MH/s | 8 | 35 W | 4.28 | - | Realtek RTD1295 | 490 kH/s | 4 | - | - | - | Realtek RTD1295 **(fasthash)** | 3.89 MH/s | 4 | - | - | - -Todas las pruebas se realizaron utilizando el algoritmo DUCO-S1 **sin aceleraciones fasthash**, a menos que se indique lo contrario. Esta tabla se actualizará activamente. +Tenga en cuenta que la columna DUCO/día se ha eliminado desde que la versión 4.0 cambió el sistema de recompensas. +| Dispositivp/CPU/SBC/MCU/chip | Tasa de hash promedio
(todos los hilos) | Hilos de minado | Potencia usada | +|-----------------------------------------------------------|--------------------------------------------|-------------------|----------------| +| Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | +| Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | +| Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | +| Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | +| Raspberry Pi 4 **(64bit, hash rápido)** | 6.8 MH/s | 4 | 6.4 W | +| ODROID XU4 | 1.0 MH/s | 8 | 5 W | +| Atomic Pi | 690 kH/s | 4 | 6 W | +| Orange Pi Zero 2 | 740 kH/s | 4 | 2.55 W | +| Khadas Vim 2 Pro | 1.12 MH/s | 8 | 6.2 W | +| Libre Computers Tritium H5CC | 480 kH/s | 4 | 5 W | +| Libre Computers Le Potato | 410 kH/s | 4 | 5 W | +| Pine64 ROCK64 | 640 kH/s | 4 | 5 W | +| Intel Celeron G1840 | 1.25 MH/s | 2 | 53 W | +| Intel Core i5-2430M | 1.18 MH/s | 4 | 35 W | +| Intel Core i5-3230M | 1.52 MH/s | 4 | 35 W | +| Intel Core i5-5350U | 1.35 MH/s | 4 | 15 W | +| Intel Core i5-7200U | 1.62 MH/s | 4 | 15 W | +| Intel Core i5-8300H | 3.67 MH/s | 8 | 45 W | +| Intel Core i3-4130 | 1.45 MH/s | 4 | 54 W | +| AMD Ryzen 5 2600 | 4.9 MH/s | 12 | 65 W | +| AMD Ryzen R1505G **(hash rápido)** | 8.5 MH/s | 4 | 35 W | +| Intel Core i7-11370H **(hash rápido)** | 17.3 MH/s | 8 | 35 W | +| Realtek RTD1295 | 490 kH/s | 4 | - | +| Realtek RTD1295 **(hash rápido)** | 3.89 MH/s | 4 | - | + +
+ @@ -207,6 +219,7 @@ Todas las pruebas se realizaron utilizando el algoritmo DUCO-S1 **sin aceleracio * [Teensy 4.1 code for Arduino IDE](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Teensy_code/Teensy_code.ino) por joaquinbvw ### Otras herramientas: + * [Duinogotchi](https://github.com/OSRdesign/duinogotchi) - Proyecto de Duino-Coin mascotas virtuales por ricaun * [Duino Miner](https://github.com/g7ltt/Duino-Miner) - Archivos y documentación del minero DUCO basado en Arduino Nano por g7ltt * [DUINO Mining Rig](https://repalmakershop.com/pages/duino-mining-rig) - Archivos 3D, diseños de PCB e instrucciones para crear tu propio Duino rig por ReP_AL * [DuinoCoin-balance-Home-Assistant](https://github.com/NL647/DuinoCoin-balance-Home-Assistant) - add-on para Home Assistant mostrando tu saldo por NL647 @@ -246,17 +259,9 @@ Nuestro aviso legal está disponible aquí:
Date: Wed, 6 Nov 2024 22:31:01 +0900 Subject: [PATCH 27/49] fix: Raspberry Pi Pico hashrate With following commit, the hash rate of Raspberry Pi Pico increased from 5KH/s to 18KH/s. https://github.com/revoxhere/duino-coin/commit/0bdc7e3f6781b9206bc8bb46fac8e3881924f325 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96c96828..59a342e2 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Captured at normal multiplier (no weekend boost) Please note the DUCO/day column has been removed since version 4.0 changed the reward system. | Device/CPU/SBC/MCU/chip | Average hashrate
(all threads) | Mining
threads | Power
usage | |-----------------------------------------------------------|-----------------------------------|-------------------|----------------| -| Raspberry Pi Pico | 5 kH/s | 1 | 0.3 W | +| Raspberry Pi Pico | 18 kH/s | 1 | 0.3 W | | Raspberry Pi Zero | 18 kH/s | 1 | 1.1 W | | Raspberry Pi 3 **(32bit)** | 440 kH/s | 4 | 5.1 W | | Raspberry Pi 4 **(32bit)** | 740 kH/s | 4 | 6.4 W | From d6d23cc0067839522a5755ea37d38a3a199b6321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ra=C3=9Fmann?= Date: Thu, 31 Oct 2024 15:03:47 +0100 Subject: [PATCH 28/49] bugfix: bring rig id to the dashboard for blushy boxes --- ESP_Code/ESP_Code.ino | 1 + 1 file changed, 1 insertion(+) diff --git a/ESP_Code/ESP_Code.ino b/ESP_Code/ESP_Code.ino index 9fa479e1..b7136a6a 100644 --- a/ESP_Code/ESP_Code.ino +++ b/ESP_Code/ESP_Code.ino @@ -649,6 +649,7 @@ void setup() { configuration->DUCO_USER = duco_username; configuration->RIG_IDENTIFIER = duco_rigid; configuration->MINER_KEY = duco_password; + RIG_IDENTIFIER = duco_rigid; String captivePortalHTML = R"( Duino BlushyBox From 933301c41c44bfd210905f36a7966c749d495b2e Mon Sep 17 00:00:00 2001 From: Thomas Wenzlaff Date: Mon, 20 Jan 2025 09:53:57 +0100 Subject: [PATCH 29/49] Update README.md Add new Tool URL --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 59a342e2..7d8cf9b8 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [Duino Miner Hassio Add-on](https://github.com/mavotronik/hassio-addons/tree/main/duino_miner_hassio_addon) by mavotronik * [Home Assistant sensors package](https://github.com/mavotronik/Duinocoin_homeassistant) by mavotronik * [ESPGUITOOL](https://github.com/CGameDev/ESPGUITOOL) by kazutokirigaya + * [DUCO Hashrate Monitor](https://gitlab.com/IT-Berater/twhashrate) hashrate java swing speedometer gui by IT-Berater You may also view a similar list on the [website](https://duinocoin.com/apps). From 6b076817d92ec8b29e6fa3163cd4b37a9b8930e7 Mon Sep 17 00:00:00 2001 From: Goldside543 Date: Sun, 23 Feb 2025 15:33:21 -0500 Subject: [PATCH 30/49] Add Raspberry Pi 5 to supported platform list --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d8cf9b8..adb28ebd 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ | Key features | Technical specifications | (Some of many) supported boards | |-|-|-| -| 💻 Supported by a large number of platforms
👥 A fast-growing community
💱 Easy to use & exchange
(on DUCO Exchange, JustSwap, SushiSwap)
🌎 Available everywhere
:new: Fully original & open-source project
🌳 Beginner & eco-friendly
💰 Cost-effective & easy to mine | ⚒️ Algorithm: DUCO-S1
♐ Rewards: supported by "Kolka system"
helping to reward miners fairly
⚡ Transaction time: Instant
🪙 Coin supply: Infinite
(with burning)
🔤 Ticker: DUCO (ᕲ)
🔢 Decimals: up to 20 | ♾️ Arduinos
(Uno, Nano, Mega, Due, Pro Mini, etc.)
📶 ESP8266s
(NodeMCU, Wemos, etc.)
📶 ESP32s
(ESP-WROOM, ESP32-CAM, etc.)
🍓 Raspberry Pis
(1, 2, Zero (W/WH), 3, 4, Pico, 400)
🍊 Orange Pis
(Zero, Zero 2, PC, Plus, etc.)
⚡ Teensy 4.1 boards | +| 💻 Supported by a large number of platforms
👥 A fast-growing community
💱 Easy to use & exchange
(on DUCO Exchange, JustSwap, SushiSwap)
🌎 Available everywhere
:new: Fully original & open-source project
🌳 Beginner & eco-friendly
💰 Cost-effective & easy to mine | ⚒️ Algorithm: DUCO-S1
♐ Rewards: supported by "Kolka system"
helping to reward miners fairly
⚡ Transaction time: Instant
🪙 Coin supply: Infinite
(with burning)
🔤 Ticker: DUCO (ᕲ)
🔢 Decimals: up to 20 | ♾️ Arduinos
(Uno, Nano, Mega, Due, Pro Mini, etc.)
📶 ESP8266s
(NodeMCU, Wemos, etc.)
📶 ESP32s
(ESP-WROOM, ESP32-CAM, etc.)
🍓 Raspberry Pis
(1, 2, Zero (W/WH), 3, 4, Pico, 400, 5)
🍊 Orange Pis
(Zero, Zero 2, PC, Plus, etc.)
⚡ Teensy 4.1 boards | ## Getting started From e4f041f1a228c5ddd541ebd8992e83e8f6248d00 Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:52:32 +0100 Subject: [PATCH 31/49] Update date --- AVR_Miner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 43c93297..824086d2 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official AVR Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2024 +Duino-Coin Team & Community 2019-2025 """ from os import _exit, mkdir @@ -805,7 +805,7 @@ def greeting(): + Style.BRIGHT + get_string('banner') + Style.RESET_ALL + Fore.MAGENTA + f' {Settings.VER}' + Fore.RESET - + ' 2019-2024') + + ' 2019-2025') print( Style.DIM + Fore.MAGENTA From bf94ec992778b20ad965f69c750970ca998bcf9e Mon Sep 17 00:00:00 2001 From: revoxhere <50244265+revoxhere@users.noreply.github.com> Date: Thu, 27 Feb 2025 14:52:48 +0100 Subject: [PATCH 32/49] Update date --- PC_Miner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PC_Miner.py b/PC_Miner.py index 87a22e47..dc565fa4 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official PC Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2024 +Duino-Coin Team & Community 2019-2025 """ from time import time, sleep, strptime, ctime, time_ns @@ -825,7 +825,7 @@ def greeting(): print("\n" + Style.DIM + Fore.YELLOW + Settings.BLOCK + Fore.YELLOW + Style.BRIGHT + get_string("banner") + Style.RESET_ALL + Fore.MAGENTA + " (" + str(Settings.VER) + ") " - + Fore.RESET + "2019-2024") + + Fore.RESET + "2019-2025") print(Style.DIM + Fore.YELLOW + Settings.BLOCK + Style.NORMAL + Fore.YELLOW + "https://github.com/revoxhere/duino-coin") From 9f6ca895ee9b0c707b4250990345d2c019b3beab Mon Sep 17 00:00:00 2001 From: profpandaa <30387483+profpandaa@users.noreply.github.com> Date: Wed, 22 Oct 2025 10:57:49 +0200 Subject: [PATCH 33/49] removed outdated nonceMiner from README translations --- Resources/README_TRANSLATIONS/README_id_ID.md | 1 - Resources/README_TRANSLATIONS/README_kr_KR.md | 1 - Resources/README_TRANSLATIONS/README_pl_PL.md | 1 - Resources/README_TRANSLATIONS/README_pt_BR.md | 1 - Resources/README_TRANSLATIONS/README_ru_RU.md | 1 - Resources/README_TRANSLATIONS/README_th_TH.md | 1 - Resources/README_TRANSLATIONS/README_tr_TR.md | 1 - Resources/README_TRANSLATIONS/README_zh_TW.md | 1 - 8 files changed, 8 deletions(-) diff --git a/Resources/README_TRANSLATIONS/README_id_ID.md b/Resources/README_TRANSLATIONS/README_id_ID.md index bfe5d02e..dc13880a 100644 --- a/Resources/README_TRANSLATIONS/README_id_ID.md +++ b/Resources/README_TRANSLATIONS/README_id_ID.md @@ -114,7 +114,6 @@ Setelah melakukan ini, Anda dapat meluncurkan perangkat lunak (cukup klik dua ka * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - Penambang MicroPython untuk papan modul ESP oleh fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python miner for Nintendo 3DS by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Penambang di Docker oleh Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Fastest Duino-Coin miner available by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - simple NodeJS miner by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - miner C murni oleh phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_kr_KR.md b/Resources/README_TRANSLATIONS/README_kr_KR.md index df6d7b3a..e3a49bb6 100644 --- a/Resources/README_TRANSLATIONS/README_kr_KR.md +++ b/Resources/README_TRANSLATIONS/README_kr_KR.md @@ -173,7 +173,6 @@ Duino-Coin 프로젝트에 대한 기여해 주시면 감사하겠습니다. * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - ESP 보드용 MicroPython 채굴기 by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Nintendo 3DS용 Python 채굴기 PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Docker 이용한 채굴기 by Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - 가장 빠른 Duino-Coin 채굴기 by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - 간단한 NodeJS 채굴기 by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - 퓨어 C 채굴기 by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_pl_PL.md b/Resources/README_TRANSLATIONS/README_pl_PL.md index 4b25a85b..da02ee51 100644 --- a/Resources/README_TRANSLATIONS/README_pl_PL.md +++ b/Resources/README_TRANSLATIONS/README_pl_PL.md @@ -113,7 +113,6 @@ Pakiet Duino-Coin dla AUR jest utrzymywany przez by [PhereloHD](https://github.c * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) by Alicia426 -* [nonceMiner](https://github.com/colonelwatch/nonceMiner) by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) by phantom32 * [Go Miner](https://github.com/yippiez/go-miner) by yippiez diff --git a/Resources/README_TRANSLATIONS/README_pt_BR.md b/Resources/README_TRANSLATIONS/README_pt_BR.md index 5243029d..97d202a8 100644 --- a/Resources/README_TRANSLATIONS/README_pt_BR.md +++ b/Resources/README_TRANSLATIONS/README_pt_BR.md @@ -165,7 +165,6 @@ O código-fonte do servidor, a documentação para chamadas de API e bibliotecas * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - Minerador em MicroPython para placas ESP, feito por fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Minerador em Python para Nintendo 3DS, feito por PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Mineradora em Docker, feito por Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - A mineradora de Duino-Coin mais rápida disponível, feita por colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - Minerador simples em NodeJS, feita pelo DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - Mineradora em C, feito por phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) por yippiez diff --git a/Resources/README_TRANSLATIONS/README_ru_RU.md b/Resources/README_TRANSLATIONS/README_ru_RU.md index 00273c7d..bd86f071 100644 --- a/Resources/README_TRANSLATIONS/README_ru_RU.md +++ b/Resources/README_TRANSLATIONS/README_ru_RU.md @@ -113,7 +113,6 @@ py -m pip install -r requirements.txt * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - MicroPython майнер для плат ESP от fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python майнер для Nintendo 3DS от PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Майнер в докере от Alicia426 -* [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Самый быстрый из доступных майнер от colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - Простой майнер NodeJS от DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - Майнер на чистом C от phantom32 & revox * [Go Miner](https://github.com/yippiez/go-miner) От yippiez diff --git a/Resources/README_TRANSLATIONS/README_th_TH.md b/Resources/README_TRANSLATIONS/README_th_TH.md index 9dde7ede..fc7a57e5 100644 --- a/Resources/README_TRANSLATIONS/README_th_TH.md +++ b/Resources/README_TRANSLATIONS/README_th_TH.md @@ -109,7 +109,6 @@ python3 -m pip install -r requirements.txt # Install pip dependencies * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - ตัวขุดไมโครไพธอนสำหรับบอร์ด ESP โดย fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - ตัวขุดไพธอนสำหรับ Nintendo 3DS โดย PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - ตัวขุดใน Docker โดย Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - ตัวขุด Duino-Coin อย่างเร็ว โดย colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - ตัวขุด NodeJS อย่างง่าย โดย DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - ตัวขุด pure C โดย phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) โดย yippiez diff --git a/Resources/README_TRANSLATIONS/README_tr_TR.md b/Resources/README_TRANSLATIONS/README_tr_TR.md index 4667e743..5dae3e0f 100644 --- a/Resources/README_TRANSLATIONS/README_tr_TR.md +++ b/Resources/README_TRANSLATIONS/README_tr_TR.md @@ -92,7 +92,6 @@ Bunu yaptıktan sonra istediğiniz yazılımı çalıştırabilirsiniz (istediğ * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - fabiopolancoe tarafından ESP kartları için MicroPython'da yazılmmış madenci * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - PhereloHD & HGEpro tarafından Nintendo 3DS için madenci yazılımı * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Alicia426 tarafından Docker içinde çalışan madenci - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - colonelwatch tarafından şu ana kadar ki en hızlı madenci yazılımı * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - DarkThinking tarafından basit bir NodeJS'de yazılmış madenci * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - phantom32 & revoxhere tarafından saf C içinde yazılmış madenci * [Go Miner](https://github.com/yippiez/go-miner) yippiez tarafından Go'da yazılmış madenci diff --git a/Resources/README_TRANSLATIONS/README_zh_TW.md b/Resources/README_TRANSLATIONS/README_zh_TW.md index e5b235b1..83febf0e 100644 --- a/Resources/README_TRANSLATIONS/README_zh_TW.md +++ b/Resources/README_TRANSLATIONS/README_zh_TW.md @@ -118,7 +118,6 @@ After doing this, you are good to go with launching the software (e.g. `python3 * [ESPython DUCO Miner](https://github.com/fabiopolancoe/ESPython-DUCO-Miner) - MicroPython miner for ESP boards by fabiopolancoe * [DUCO Miner for Nintendo 3DS](https://github.com/BunkerInnovations/duco-3ds) - Python miner for Nintendo 3DS by PhereloHD & HGEpro * [Dockerized DUCO Miner](https://github.com/Alicia426/Dockerized_DUCO_Miner_minimal) - Miner in Docker by Alicia426 - * [nonceMiner](https://github.com/colonelwatch/nonceMiner) - Fastest Duino-Coin miner available by colonelwatch * [NodeJS-DuinoCoin-Miner](https://github.com/DarkThinking/NodeJS-DuinoCoin-Miner/) - simple NodeJS miner by DarkThinking * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - pure C miner by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez From 2bba65d521a782e8248ef119a482f23fc87f7d82 Mon Sep 17 00:00:00 2001 From: Dmitry Gribenchuk Date: Wed, 10 Sep 2025 15:47:04 +0300 Subject: [PATCH 34/49] update AVR_Miner_langs.json for russian language Signed-off-by: Dmitry Gribenchuk --- Resources/AVR_Miner_langs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/AVR_Miner_langs.json b/Resources/AVR_Miner_langs.json index 1bb2db73..50a99750 100644 --- a/Resources/AVR_Miner_langs.json +++ b/Resources/AVR_Miner_langs.json @@ -520,8 +520,8 @@ "mining_not_exist_warning": " Убедитесь в том, что вы правильно ввели имя пользователя. Пожалуйста, проверьте ваш файл настроек. Пробуем еще раз через 10с", "load_config_error": " Ошибка загрузки файла настроек (", "load_config_error_warning": "/Miner_config.cfg). Попробуйте удалить его и перезапустить настройку. Выход через 10с", - "new_version": "A new version is available, you want to update miner [Y/n] ? ", - "updating": "The miner is outdated. Updating...." + "new_version": "Доступна новая версия, хотите обновить майнер [Y/n] ? ", + "updating": "Майнер устарел. Обновляю...." }, "spanish": { "translation_autor": "HGEpro", From 0f05374c645159a92af9cf44ef208b61d7150f80 Mon Sep 17 00:00:00 2001 From: Thomas Wenzlaff Date: Fri, 21 Mar 2025 18:29:43 +0100 Subject: [PATCH 35/49] Update README.md Add URL for Retrieving Duino-Coin Wallet Status via REST API and Displaying it on an OLED Display with ESP32 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index adb28ebd..4bf6a154 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [Home Assistant sensors package](https://github.com/mavotronik/Duinocoin_homeassistant) by mavotronik * [ESPGUITOOL](https://github.com/CGameDev/ESPGUITOOL) by kazutokirigaya * [DUCO Hashrate Monitor](https://gitlab.com/IT-Berater/twhashrate) hashrate java swing speedometer gui by IT-Berater + * [DUCO Wallet ESP32 Ticker](https://gitlab.com/IT-Berater/twesp32/-/blob/main/README-DUINO.md) Displaying Duino-Coin Wallet Status on an OLED Display with ESP32 by IT-Berater You may also view a similar list on the [website](https://duinocoin.com/apps). From c5ee68efbf09cb0cf1ce1e59ea446373216c555a Mon Sep 17 00:00:00 2001 From: tbwcjw <35520616+tbwcjw@users.noreply.github.com> Date: Wed, 21 May 2025 13:34:06 -0400 Subject: [PATCH 36/49] Added nxducominer to list of miners Added nxducominer to list of miners --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4bf6a154..c9af4f72 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r * [d-cpuminer](https://github.com/phantom32-0/d-cpuminer) - pure C miner by phantom32 & revoxhere * [Go Miner](https://github.com/yippiez/go-miner) by yippiez * [ducominer](https://github.com/its5Q/ducominer) by its5Q + * [nxducominer](https://github.com/tbwcjw/nxducominer/) - Miner for the Nintendo Switch by tbwcjw * [Unofficial miners directory](https://github.com/revoxhere/duino-coin/tree/master/Unofficial%20miners) * [Julia Miner](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Julia_Miner.jl) by revoxhere * [Ruby Miner](https://github.com/revoxhere/duino-coin/blob/master/Unofficial%20miners/Ruby_Miner.rb) by revoxhere From 8373b10402fa3ad96e42a5f2a0012de0ab65f52b Mon Sep 17 00:00:00 2001 From: profpandaa <30387483+profpandaa@users.noreply.github.com> Date: Thu, 23 Oct 2025 12:38:21 +0200 Subject: [PATCH 37/49] chore: changed README disclaimer above community softwares --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9af4f72..d6d51380 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Please note the DUCO/day column has been removed since version 4.0 changed the r ## Community-made softwares -### Please note that these softwares are not developed by us and we do not give any guarantees that use of them will not result in an account getting banned if they get changed in the future. +### Please note that these softwares are not developed by us and we do not guarantee them working properly. Additionally note that using outdated and/or unofficial miners may produce warnings or a ban. ### Miners made by the Duino-Coin community: * [Dockerized Duino-Coin Miner](https://github.com/simeononsecurity/docker-duino-coin) - A Dockerized version of the Duino-Coin Miner by simeononsecurity From e8a0613d42fc9242cb117c78dde77dd16cf43ba3 Mon Sep 17 00:00:00 2001 From: Tech1k Date: Thu, 1 Jan 2026 21:42:36 -0700 Subject: [PATCH 38/49] Happy 2026 Duino miners! (increment copyright year) --- AVR_Miner.py | 4 ++-- Arduino_Code/Arduino_Code.ino | 2 +- PC_Miner.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 824086d2..caf81203 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official AVR Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2025 +Duino-Coin Team & Community 2019-2026 """ from os import _exit, mkdir @@ -805,7 +805,7 @@ def greeting(): + Style.BRIGHT + get_string('banner') + Style.RESET_ALL + Fore.MAGENTA + f' {Settings.VER}' + Fore.RESET - + ' 2019-2025') + + ' 2019-2026') print( Style.DIM + Fore.MAGENTA diff --git a/Arduino_Code/Arduino_Code.ino b/Arduino_Code/Arduino_Code.ino index 1947373e..5480bdcd 100644 --- a/Arduino_Code/Arduino_Code.ino +++ b/Arduino_Code/Arduino_Code.ino @@ -6,7 +6,7 @@ (____/(______)(____)(_)\_)(_____) \___)(_____)(____)(_)\_) Official code for Arduino boards (and relatives) version 4.3 - Duino-Coin Team & Community 2019-2024 © MIT Licensed + Duino-Coin Team & Community 2019-2026 © MIT Licensed https://duinocoin.com https://github.com/revoxhere/duino-coin If you don't know where to start, visit official website and navigate to diff --git a/PC_Miner.py b/PC_Miner.py index dc565fa4..c5c36494 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -3,7 +3,7 @@ Duino-Coin Official PC Miner 4.3 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin -Duino-Coin Team & Community 2019-2025 +Duino-Coin Team & Community 2019-2026 """ from time import time, sleep, strptime, ctime, time_ns @@ -825,7 +825,7 @@ def greeting(): print("\n" + Style.DIM + Fore.YELLOW + Settings.BLOCK + Fore.YELLOW + Style.BRIGHT + get_string("banner") + Style.RESET_ALL + Fore.MAGENTA + " (" + str(Settings.VER) + ") " - + Fore.RESET + "2019-2025") + + Fore.RESET + "2019-2026") print(Style.DIM + Fore.YELLOW + Settings.BLOCK + Style.NORMAL + Fore.YELLOW + "https://github.com/revoxhere/duino-coin") From 856d0a66cd0364d079ffc608924ab6d74c603ac8 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Tue, 3 Mar 2026 23:08:54 -0300 Subject: [PATCH 39/49] feat: Create a display hardware abstraction layer (DisplayHal) supporting SSD1306, 16x2, and ST7789 screens with setup, boot, info, and mining results display functions. --- ESP_Code/DisplayHal.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 75b0b5ab..5742f37e 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -87,7 +87,7 @@ #if defined(DISPLAY_ST7789) tft.begin(); - tft.setRotation(1); + tft.setRotation(1); tft.init(); tft.fillScreen(BLACK); #endif @@ -305,35 +305,34 @@ #endif #if defined(DISPLAY_ST7789) - tft.init(); - tft.fillScreen(BLACK); - tft.setTextColor(WHITE); + // Use background color to overwrite old text (no fillScreen needed = no flicker) + tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); tft.setCursor(2, 10); - tft.print("Hashrate: " + hashrate + " kH"); + tft.print("Hashrate: " + hashrate + " kH "); tft.setCursor(2, 30); - tft.print("Node: " + node); + tft.print("Node: " + node + " "); tft.setCursor(2, 50); - tft.print("Accepted/Total: " + accepted_shares + "/" + total_shares); + tft.print("Accepted/Total: " + accepted_shares + "/" + total_shares + " "); tft.setCursor(2, 70); - tft.print("Accepted Rate: " + accept_rate + "%"); + tft.print("Accepted Rate: " + accept_rate + "% "); tft.setCursor(2, 90); - tft.print("Ping: " + ping + " ms"); + tft.print("Ping: " + ping + " ms "); tft.setCursor(2, 110); - tft.print("Uptime: " + uptime); + tft.print("Uptime: " + uptime + " "); tft.setCursor(2, 130); - tft.print("Share Rate: " + sharerate); + tft.print("Share Rate: " + sharerate + " "); tft.setCursor(2, 150); - tft.print("Difficulty: " + difficulty); + tft.print("Difficulty: " + difficulty + " "); tft.setCursor(2, 200); - tft.print("IP: " + WiFi.localIP().toString()); + tft.print("IP: " + WiFi.localIP().toString() + " "); #endif } From 2df779eac31a907e8ca2fd30290e6ad48b6a7471 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Tue, 3 Mar 2026 23:52:13 -0300 Subject: [PATCH 40/49] feat: add `Settings.h` for configuration and `DisplayHal.h` for display hardware abstraction. --- ESP_Code/DisplayHal.h | 289 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 260 insertions(+), 29 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 5742f37e..e63e373e 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -22,9 +22,68 @@ #endif #if defined(DISPLAY_ST7789) - // Define some colors - #define WHITE TFT_WHITE - #define BLACK TFT_BLACK + // Define colors + #define WHITE TFT_WHITE + #define BLACK TFT_BLACK + #define DUCO_GOLD 0xFD20 + #define DUCO_GRAY 0x7BEF + #define DUCO_DARK 0x39E7 + #define DUCO_GREEN 0x07E0 + #define DUCO_CYAN 0x07FF + + // Draw WiFi signal bars + void drawWifiBars(int x, int y) { + int rssi = WiFi.RSSI(); + int bars = (rssi > -40) ? 4 : (rssi > -60) ? 3 : (rssi > -75) ? 2 : 1; + for (int i = 0; i < 4; i++) { + int barH = 6 + i * 5; + int barY = y + 20 - barH; + uint16_t color = (i < bars) ? DUCO_GREEN : DUCO_DARK; + tft.fillRect(x + i * 9, barY, 7, barH, color); + } + } + + // Draw checkmark icon + void drawCheckmark(int x, int y) { + tft.drawLine(x, y+8, x+5, y+13, DUCO_GREEN); + tft.drawLine(x+1, y+8, x+6, y+13, DUCO_GREEN); + tft.drawLine(x+5, y+13, x+14, y+2, DUCO_GREEN); + tft.drawLine(x+6, y+13, x+15, y+2, DUCO_GREEN); + } + + // Draw the static layout elements (called once) + bool tft_layout_drawn = false; + // Guard flag to prevent concurrent display access from both cores + volatile bool tft_busy = false; + void drawStaticLayout() { + tft.fillScreen(BLACK); + // Top separator + tft.drawFastHLine(0, 28, 320, DUCO_DARK); + // Middle separator + tft.drawFastHLine(0, 105, 320, DUCO_DARK); + // Bottom separator + tft.drawFastHLine(0, 140, 320, DUCO_DARK); + // kH/s label (static) + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setTextSize(2); + tft.setCursor(160, 55); + tft.print("kH/s"); + // diff label (static) + tft.setTextSize(1); + tft.setCursor(280, 40); + tft.print("diff"); + // shr/s label (static) + tft.setCursor(274, 60); + tft.print("shr/s"); + // Separator between diff and shr/s + tft.drawFastHLine(160, 55, 155, DUCO_DARK); + // Version + label in bottom bar + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(5, 147); + tft.print("Duino-Coin " + String(SOFTWARE_VERSION)); + tft_layout_drawn = true; + } #endif #if defined(DISPLAY_SSD1306) @@ -180,6 +239,76 @@ drawStrMultiline(features_str.c_str(), 2, 46); u8g2.sendBuffer(); #endif + + #if defined(DISPLAY_ST7789) + tft.fillScreen(BLACK); + tft_layout_drawn = false; + + // Board type + frequency + tft.setTextColor(DUCO_GOLD, BLACK); + tft.setTextSize(3); + tft.setCursor(10, 15); + #if defined(ESP8266) + tft.print("ESP8266 "); + #elif defined(CONFIG_FREERTOS_UNICORE) + tft.print("ESP32S2/C3 "); + #else + tft.print("ESP32 "); + #endif + #if defined(ESP8266) + tft.print(String(ESP.getCpuFreqMHz()).c_str()); + #else + tft.print(String(getCpuFrequencyMhz()).c_str()); + #endif + tft.print(" MHz"); + + // Separator + tft.drawFastHLine(10, 50, 300, DUCO_DARK); + + // Compile date + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(10, 60); + tft.print("Compiled "); + tft.print(__DATE__); + + // Features + tft.setTextColor(DUCO_CYAN, BLACK); + tft.setCursor(10, 90); + tft.print("Features:"); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(1); + tft.setCursor(10, 115); + String features_str = "OTA "; + #if defined(USE_LAN) + features_str += "LAN "; + #endif + #if defined(LED_BLINKING) + features_str += "Blink "; + #endif + #if defined(SERIAL_PRINTING) + features_str += "Serial "; + #endif + #if defined(WEB_DASHBOARD) + features_str += "Webserver "; + #endif + #if defined(DISPLAY_ST7789) + features_str += "ST7789 "; + #endif + #if defined(USE_INTERNAL_SENSOR) + features_str += "Int.sensor "; + #endif + #if defined(USE_DS18B20) + features_str += "DS18B20 "; + #endif + #if defined(USE_DHT) + features_str += "DHT "; + #endif + #if defined(USE_HSU07M) + features_str += "HSU07M "; + #endif + tft.print(features_str); + #endif } void display_info(String message) { @@ -218,6 +347,54 @@ lcd.setCursor(0, 1); lcd.print(message); #endif + + #if defined(DISPLAY_ST7789) + tft.fillScreen(BLACK); + tft_layout_drawn = false; + + // Duino-Coin title + tft.setTextColor(DUCO_GOLD, BLACK); + tft.setTextSize(3); + tft.setCursor(50, 10); + tft.print("Duino-Coin"); + + // Board type + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(3); + tft.setCursor(50, 45); + #if defined(ESP8266) + tft.print("ESP8266"); + #elif defined(CONFIG_FREERTOS_UNICORE) + tft.print("ESP32S2/C3"); + #else + tft.print("ESP32"); + #endif + + // MINER label + tft.setTextColor(DUCO_GOLD, BLACK); + tft.setTextSize(2); + tft.setCursor(230, 50); + tft.print("MINER"); + + // Version + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(280, 70); + tft.print("v"); + tft.print(String(SOFTWARE_VERSION).c_str()); + + // URL + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setTextSize(1); + tft.setCursor(50, 85); + tft.print("www.duinocoin.com"); + + // Message + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(10, 130); + tft.print(message); + #endif } @@ -305,35 +482,89 @@ #endif #if defined(DISPLAY_ST7789) - // Use background color to overwrite old text (no fillScreen needed = no flicker) + // Prevent concurrent access from both cores + if (tft_busy) return; + tft_busy = true; + + // Draw static layout elements once (separators, labels) + if (!tft_layout_drawn) { + drawStaticLayout(); + } + + // === TOP BAR (y=0..27) === + // WiFi signal bars + drawWifiBars(5, 3); + + // Ping + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(45, 6); + tft.print(ping + "ms "); + + // Node + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(140, 10); + tft.print(node + " "); + + // === MAIN AREA (y=30..104) === + // Clear hashrate area to prevent stray pixels when size changes + tft.fillRect(5, 35, 150, 40, BLACK); + + // Hashrate (large) + tft.setTextColor(DUCO_GREEN, BLACK); + if (hashrate.toFloat() < 100.0) { + tft.setTextSize(4); + tft.setCursor(5, 40); + } else { + tft.setTextSize(3); + tft.setCursor(5, 45); + } + tft.print(hashrate); + + // Difficulty value + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(165, 35); + tft.print(difficulty + " "); + + // Share rate value + tft.setCursor(165, 60); + tft.print(sharerate + " "); + + // === SHARES BAR (y=106..139) === + // Clear checkmark area then redraw + tft.fillRect(3, 110, 20, 18, BLACK); + drawCheckmark(5, 112); + + // Accepted / Total + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(28, 112); + tft.print(accepted_shares + "/" + total_shares + " "); + + // Accept rate + tft.setTextSize(1); + tft.setTextColor(DUCO_CYAN, BLACK); + tft.setCursor(215, 118); + tft.print("(" + accept_rate + "%) "); + + // === BOTTOM BAR (y=141..169) === + // IP address + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(5, 158); + tft.print(WiFi.localIP().toString() + " "); + + // Uptime (right-aligned) - clear area first + tft.fillRect(160, 145, 160, 20, BLACK); tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - tft.setCursor(2, 10); - tft.print("Hashrate: " + hashrate + " kH "); - - tft.setCursor(2, 30); - tft.print("Node: " + node + " "); - - tft.setCursor(2, 50); - tft.print("Accepted/Total: " + accepted_shares + "/" + total_shares + " "); - tft.setCursor(2, 70); - tft.print("Accepted Rate: " + accept_rate + "% "); - - tft.setCursor(2, 90); - tft.print("Ping: " + ping + " ms "); - - tft.setCursor(2, 110); - tft.print("Uptime: " + uptime + " "); - - tft.setCursor(2, 130); - tft.print("Share Rate: " + sharerate + " "); - tft.setCursor(2, 150); - tft.print("Difficulty: " + difficulty + " "); - - tft.setCursor(2, 200); - tft.print("IP: " + WiFi.localIP().toString() + " "); + int uptimeWidth = uptime.length() * 12; + tft.setCursor(315 - uptimeWidth, 148); + tft.print(uptime); + tft_busy = false; #endif } #endif From 038bc0169f866a9ce7458fd79013d3bbbfa618be Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Wed, 4 Mar 2026 00:20:24 -0300 Subject: [PATCH 41/49] feat: display hardware abstraction for the ESP miner. --- ESP_Code/DisplayHal.h | 309 +++++++++++++++++++++++++++--------------- 1 file changed, 199 insertions(+), 110 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index e63e373e..4b40b4b0 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -31,6 +31,11 @@ #define DUCO_GREEN 0x07E0 #define DUCO_CYAN 0x07FF + // Button and rotation + #define TFT_BUTTON_PIN 0 // Boot button on T-Display S3 + uint8_t tft_rotation = 1; // 1=landscape(320x170), 0=portrait(170x320) + unsigned long tft_last_button = 0; + // Draw WiFi signal bars void drawWifiBars(int x, int y) { int rssi = WiFi.RSSI(); @@ -51,37 +56,56 @@ tft.drawLine(x+6, y+13, x+15, y+2, DUCO_GREEN); } - // Draw the static layout elements (called once) + // State flags bool tft_layout_drawn = false; - // Guard flag to prevent concurrent display access from both cores volatile bool tft_busy = false; + + // Check button and toggle rotation + void checkButton() { + if (digitalRead(TFT_BUTTON_PIN) == LOW && (millis() - tft_last_button > 500)) { + tft_last_button = millis(); + tft_rotation = (tft_rotation == 1) ? 0 : 1; + tft.setRotation(tft_rotation); + tft_layout_drawn = false; + } + } + + // Draw static layout (separators + labels) void drawStaticLayout() { tft.fillScreen(BLACK); - // Top separator - tft.drawFastHLine(0, 28, 320, DUCO_DARK); - // Middle separator - tft.drawFastHLine(0, 105, 320, DUCO_DARK); - // Bottom separator - tft.drawFastHLine(0, 140, 320, DUCO_DARK); - // kH/s label (static) tft.setTextColor(DUCO_GRAY, BLACK); - tft.setTextSize(2); - tft.setCursor(160, 55); - tft.print("kH/s"); - // diff label (static) - tft.setTextSize(1); - tft.setCursor(280, 40); - tft.print("diff"); - // shr/s label (static) - tft.setCursor(274, 60); - tft.print("shr/s"); - // Separator between diff and shr/s - tft.drawFastHLine(160, 55, 155, DUCO_DARK); - // Version + label in bottom bar - tft.setTextSize(1); - tft.setTextColor(DUCO_GRAY, BLACK); - tft.setCursor(5, 147); - tft.print("Duino-Coin " + String(SOFTWARE_VERSION)); + + if (tft_rotation == 1) { + // === LANDSCAPE 320x170 === + tft.drawFastHLine(0, 28, 320, DUCO_DARK); + tft.drawFastHLine(0, 105, 320, DUCO_DARK); + tft.drawFastHLine(0, 140, 320, DUCO_DARK); + tft.drawFastHLine(160, 55, 155, DUCO_DARK); + tft.setTextSize(2); + tft.setCursor(160, 55); + tft.print("kH/s"); + tft.setTextSize(1); + tft.setCursor(280, 40); + tft.print("diff"); + tft.setCursor(274, 60); + tft.print("shr/s"); + tft.setCursor(5, 147); + tft.print("Duino-Coin " + String(SOFTWARE_VERSION)); + } else { + // === PORTRAIT 170x320 === + tft.drawFastHLine(0, 28, 170, DUCO_DARK); + tft.drawFastHLine(0, 130, 170, DUCO_DARK); + tft.drawFastHLine(0, 195, 170, DUCO_DARK); + tft.drawFastHLine(0, 255, 170, DUCO_DARK); + // kH/s label centered + tft.setTextSize(2); + tft.setCursor(55, 100); + tft.print("kH/s"); + // Bottom version + tft.setTextSize(1); + tft.setCursor(5, 262); + tft.print("Duino-Coin " + String(SOFTWARE_VERSION)); + } tft_layout_drawn = true; } #endif @@ -145,8 +169,9 @@ #endif #if defined(DISPLAY_ST7789) + pinMode(TFT_BUTTON_PIN, INPUT_PULLUP); tft.begin(); - tft.setRotation(1); + tft.setRotation(tft_rotation); tft.init(); tft.fillScreen(BLACK); #endif @@ -243,10 +268,11 @@ #if defined(DISPLAY_ST7789) tft.fillScreen(BLACK); tft_layout_drawn = false; + int sw = tft.width(); // Board type + frequency tft.setTextColor(DUCO_GOLD, BLACK); - tft.setTextSize(3); + tft.setTextSize(sw > 200 ? 3 : 2); tft.setCursor(10, 15); #if defined(ESP8266) tft.print("ESP8266 "); @@ -263,22 +289,23 @@ tft.print(" MHz"); // Separator - tft.drawFastHLine(10, 50, 300, DUCO_DARK); + tft.drawFastHLine(10, sw > 200 ? 50 : 45, sw - 20, DUCO_DARK); // Compile date tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - tft.setCursor(10, 60); + tft.setTextSize(sw > 200 ? 2 : 1); + tft.setCursor(10, sw > 200 ? 60 : 55); tft.print("Compiled "); tft.print(__DATE__); // Features tft.setTextColor(DUCO_CYAN, BLACK); - tft.setCursor(10, 90); + tft.setTextSize(sw > 200 ? 2 : 1); + tft.setCursor(10, sw > 200 ? 90 : 75); tft.print("Features:"); tft.setTextColor(WHITE, BLACK); tft.setTextSize(1); - tft.setCursor(10, 115); + tft.setCursor(10, sw > 200 ? 115 : 95); String features_str = "OTA "; #if defined(USE_LAN) features_str += "LAN "; @@ -351,17 +378,19 @@ #if defined(DISPLAY_ST7789) tft.fillScreen(BLACK); tft_layout_drawn = false; + int sw = tft.width(); + int sh = tft.height(); // Duino-Coin title tft.setTextColor(DUCO_GOLD, BLACK); - tft.setTextSize(3); - tft.setCursor(50, 10); + tft.setTextSize(sw > 200 ? 3 : 2); + tft.setCursor(sw > 200 ? 50 : 10, 10); tft.print("Duino-Coin"); // Board type tft.setTextColor(WHITE, BLACK); - tft.setTextSize(3); - tft.setCursor(50, 45); + tft.setTextSize(sw > 200 ? 3 : 2); + tft.setCursor(sw > 200 ? 50 : 10, sw > 200 ? 45 : 40); #if defined(ESP8266) tft.print("ESP8266"); #elif defined(CONFIG_FREERTOS_UNICORE) @@ -373,26 +402,26 @@ // MINER label tft.setTextColor(DUCO_GOLD, BLACK); tft.setTextSize(2); - tft.setCursor(230, 50); + tft.setCursor(sw > 200 ? 230 : 100, sw > 200 ? 50 : 45); tft.print("MINER"); // Version tft.setTextSize(1); tft.setTextColor(DUCO_GRAY, BLACK); - tft.setCursor(280, 70); + tft.setCursor(sw > 200 ? 280 : 10, sw > 200 ? 70 : 70); tft.print("v"); tft.print(String(SOFTWARE_VERSION).c_str()); // URL tft.setTextColor(DUCO_GRAY, BLACK); tft.setTextSize(1); - tft.setCursor(50, 85); + tft.setCursor(sw > 200 ? 50 : 10, sw > 200 ? 85 : 85); tft.print("www.duinocoin.com"); // Message tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); - tft.setCursor(10, 130); + tft.setCursor(10, sw > 200 ? 130 : 110); tft.print(message); #endif } @@ -486,83 +515,143 @@ if (tft_busy) return; tft_busy = true; + // Check for rotation button press + checkButton(); + // Draw static layout elements once (separators, labels) if (!tft_layout_drawn) { drawStaticLayout(); } - // === TOP BAR (y=0..27) === - // WiFi signal bars - drawWifiBars(5, 3); + if (tft_rotation == 1) { + // ========== LANDSCAPE 320x170 ========== + // === TOP BAR === + drawWifiBars(5, 3); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(45, 6); + tft.print(ping + "ms "); + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(140, 10); + tft.print(node + " "); + + // === HASHRATE === + tft.fillRect(5, 35, 150, 40, BLACK); + tft.setTextColor(DUCO_GREEN, BLACK); + if (hashrate.toFloat() < 100.0) { + tft.setTextSize(4); + tft.setCursor(5, 40); + } else { + tft.setTextSize(3); + tft.setCursor(5, 45); + } + tft.print(hashrate); + + // === DIFF + SHARERATE === + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(165, 35); + tft.print(difficulty + " "); + tft.setCursor(165, 60); + tft.print(sharerate + " "); + + // === SHARES === + tft.fillRect(3, 110, 20, 18, BLACK); + drawCheckmark(5, 112); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(28, 112); + tft.print(accepted_shares + "/" + total_shares + " "); + tft.setTextSize(1); + tft.setTextColor(DUCO_CYAN, BLACK); + tft.setCursor(215, 118); + tft.print("(" + accept_rate + "%) "); + + // === BOTTOM === + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(5, 158); + tft.print(WiFi.localIP().toString() + " "); + tft.fillRect(160, 145, 160, 20, BLACK); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + int uptimeW = uptime.length() * 12; + tft.setCursor(315 - uptimeW, 148); + tft.print(uptime); - // Ping - tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - tft.setCursor(45, 6); - tft.print(ping + "ms "); - - // Node - tft.setTextSize(1); - tft.setTextColor(DUCO_GRAY, BLACK); - tft.setCursor(140, 10); - tft.print(node + " "); - - // === MAIN AREA (y=30..104) === - // Clear hashrate area to prevent stray pixels when size changes - tft.fillRect(5, 35, 150, 40, BLACK); - - // Hashrate (large) - tft.setTextColor(DUCO_GREEN, BLACK); - if (hashrate.toFloat() < 100.0) { - tft.setTextSize(4); - tft.setCursor(5, 40); } else { - tft.setTextSize(3); - tft.setCursor(5, 45); + // ========== PORTRAIT 170x320 ========== + // === TOP BAR (0..27) === + drawWifiBars(5, 3); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(45, 6); + tft.print(ping + "ms "); + // Node doesn't fit well on top bar in portrait, skip or shrink + + // === HASHRATE (30..129) === + tft.fillRect(5, 35, 160, 60, BLACK); + tft.setTextColor(DUCO_GREEN, BLACK); + if (hashrate.toFloat() < 100.0) { + tft.setTextSize(5); + tft.setCursor(10, 42); + } else { + tft.setTextSize(4); + tft.setCursor(10, 48); + } + tft.print(hashrate); + + // === STATS (132..194) === + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(5, 138); + tft.print(difficulty + " "); + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(100, 143); + tft.print("diff"); + + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(5, 165); + tft.print(sharerate + " "); + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(100, 170); + tft.print("shr/s"); + + // === SHARES (197..254) === + tft.fillRect(3, 202, 20, 18, BLACK); + drawCheckmark(5, 204); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + tft.setCursor(28, 204); + tft.print(accepted_shares + "/" + total_shares + " "); + tft.setTextSize(1); + tft.setTextColor(DUCO_CYAN, BLACK); + tft.setCursor(28, 228); + tft.print("(" + accept_rate + "%) "); + + // Node name + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setTextSize(1); + tft.setCursor(5, 243); + tft.print(node + " "); + + // === BOTTOM (257..320) === + tft.setTextSize(1); + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setCursor(5, 275); + tft.print(WiFi.localIP().toString() + " "); + + tft.fillRect(0, 290, 170, 25, BLACK); + tft.setTextColor(WHITE, BLACK); + tft.setTextSize(2); + int uptimeW = uptime.length() * 12; + tft.setCursor(165 - uptimeW, 295); + tft.print(uptime); } - tft.print(hashrate); - - // Difficulty value - tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - tft.setCursor(165, 35); - tft.print(difficulty + " "); - - // Share rate value - tft.setCursor(165, 60); - tft.print(sharerate + " "); - - // === SHARES BAR (y=106..139) === - // Clear checkmark area then redraw - tft.fillRect(3, 110, 20, 18, BLACK); - drawCheckmark(5, 112); - - // Accepted / Total - tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - tft.setCursor(28, 112); - tft.print(accepted_shares + "/" + total_shares + " "); - - // Accept rate - tft.setTextSize(1); - tft.setTextColor(DUCO_CYAN, BLACK); - tft.setCursor(215, 118); - tft.print("(" + accept_rate + "%) "); - - // === BOTTOM BAR (y=141..169) === - // IP address - tft.setTextSize(1); - tft.setTextColor(DUCO_GRAY, BLACK); - tft.setCursor(5, 158); - tft.print(WiFi.localIP().toString() + " "); - - // Uptime (right-aligned) - clear area first - tft.fillRect(160, 145, 160, 20, BLACK); - tft.setTextColor(WHITE, BLACK); - tft.setTextSize(2); - int uptimeWidth = uptime.length() * 12; - tft.setCursor(315 - uptimeWidth, 148); - tft.print(uptime); tft_busy = false; #endif From 8cdbb0a94d403d00ed24244e2ea62c04d60e12b6 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Wed, 4 Mar 2026 10:13:32 -0300 Subject: [PATCH 42/49] fix: display rotation --- ESP_Code/DisplayHal.h | 71 +++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 4b40b4b0..47a2e1fa 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -33,8 +33,13 @@ // Button and rotation #define TFT_BUTTON_PIN 0 // Boot button on T-Display S3 - uint8_t tft_rotation = 1; // 1=landscape(320x170), 0=portrait(170x320) - unsigned long tft_last_button = 0; + uint8_t tft_rotation = 1; // 0,1,2,3 = 4 orientations + volatile bool tft_rotation_changed = false; + + // Interrupt handler - fires instantly on button press + void IRAM_ATTR buttonISR() { + tft_rotation_changed = true; + } // Draw WiFi signal bars void drawWifiBars(int x, int y) { @@ -60,22 +65,27 @@ bool tft_layout_drawn = false; volatile bool tft_busy = false; - // Check button and toggle rotation + // Apply rotation change (called from main loop, not ISR) void checkButton() { - if (digitalRead(TFT_BUTTON_PIN) == LOW && (millis() - tft_last_button > 500)) { - tft_last_button = millis(); - tft_rotation = (tft_rotation == 1) ? 0 : 1; + if (tft_rotation_changed) { + tft_rotation_changed = false; + tft_rotation = (tft_rotation + 1) % 4; // Cycle: 0→1→2→3→0 tft.setRotation(tft_rotation); tft_layout_drawn = false; } } + // Check if current rotation is landscape (1 or 3) or portrait (0 or 2) + bool isLandscape() { + return (tft_rotation == 1 || tft_rotation == 3); + } + // Draw static layout (separators + labels) void drawStaticLayout() { tft.fillScreen(BLACK); tft.setTextColor(DUCO_GRAY, BLACK); - if (tft_rotation == 1) { + if (isLandscape()) { // === LANDSCAPE 320x170 === tft.drawFastHLine(0, 28, 320, DUCO_DARK); tft.drawFastHLine(0, 105, 320, DUCO_DARK); @@ -170,6 +180,7 @@ #if defined(DISPLAY_ST7789) pinMode(TFT_BUTTON_PIN, INPUT_PULLUP); + attachInterrupt(digitalPinToInterrupt(TFT_BUTTON_PIN), buttonISR, FALLING); tft.begin(); tft.setRotation(tft_rotation); tft.init(); @@ -269,10 +280,11 @@ tft.fillScreen(BLACK); tft_layout_drawn = false; int sw = tft.width(); + bool landscape = isLandscape(); // Board type + frequency tft.setTextColor(DUCO_GOLD, BLACK); - tft.setTextSize(sw > 200 ? 3 : 2); + tft.setTextSize(landscape ? 3 : 2); tft.setCursor(10, 15); #if defined(ESP8266) tft.print("ESP8266 "); @@ -289,23 +301,23 @@ tft.print(" MHz"); // Separator - tft.drawFastHLine(10, sw > 200 ? 50 : 45, sw - 20, DUCO_DARK); + tft.drawFastHLine(10, landscape ? 50 : 45, sw - 20, DUCO_DARK); // Compile date tft.setTextColor(WHITE, BLACK); - tft.setTextSize(sw > 200 ? 2 : 1); - tft.setCursor(10, sw > 200 ? 60 : 55); + tft.setTextSize(landscape ? 2 : 1); + tft.setCursor(10, landscape ? 60 : 55); tft.print("Compiled "); tft.print(__DATE__); // Features tft.setTextColor(DUCO_CYAN, BLACK); - tft.setTextSize(sw > 200 ? 2 : 1); - tft.setCursor(10, sw > 200 ? 90 : 75); + tft.setTextSize(landscape ? 2 : 1); + tft.setCursor(10, landscape ? 90 : 75); tft.print("Features:"); tft.setTextColor(WHITE, BLACK); tft.setTextSize(1); - tft.setCursor(10, sw > 200 ? 115 : 95); + tft.setCursor(10, landscape ? 115 : 95); String features_str = "OTA "; #if defined(USE_LAN) features_str += "LAN "; @@ -379,18 +391,19 @@ tft.fillScreen(BLACK); tft_layout_drawn = false; int sw = tft.width(); + bool landscape = isLandscape(); int sh = tft.height(); // Duino-Coin title tft.setTextColor(DUCO_GOLD, BLACK); - tft.setTextSize(sw > 200 ? 3 : 2); - tft.setCursor(sw > 200 ? 50 : 10, 10); + tft.setTextSize(landscape ? 3 : 2); + tft.setCursor(landscape ? 50 : 10, 10); tft.print("Duino-Coin"); // Board type tft.setTextColor(WHITE, BLACK); - tft.setTextSize(sw > 200 ? 3 : 2); - tft.setCursor(sw > 200 ? 50 : 10, sw > 200 ? 45 : 40); + tft.setTextSize(landscape ? 3 : 2); + tft.setCursor(landscape ? 50 : 10, landscape ? 45 : 40); #if defined(ESP8266) tft.print("ESP8266"); #elif defined(CONFIG_FREERTOS_UNICORE) @@ -402,26 +415,26 @@ // MINER label tft.setTextColor(DUCO_GOLD, BLACK); tft.setTextSize(2); - tft.setCursor(sw > 200 ? 230 : 100, sw > 200 ? 50 : 45); + tft.setCursor(landscape ? 230 : 100, landscape ? 50 : 45); tft.print("MINER"); // Version tft.setTextSize(1); tft.setTextColor(DUCO_GRAY, BLACK); - tft.setCursor(sw > 200 ? 280 : 10, sw > 200 ? 70 : 70); + tft.setCursor(landscape ? 280 : 10, landscape ? 70 : 70); tft.print("v"); tft.print(String(SOFTWARE_VERSION).c_str()); // URL tft.setTextColor(DUCO_GRAY, BLACK); tft.setTextSize(1); - tft.setCursor(sw > 200 ? 50 : 10, sw > 200 ? 85 : 85); + tft.setCursor(landscape ? 50 : 10, landscape ? 85 : 85); tft.print("www.duinocoin.com"); // Message tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); - tft.setCursor(10, sw > 200 ? 130 : 110); + tft.setCursor(10, landscape ? 130 : 110); tft.print(message); #endif } @@ -523,7 +536,7 @@ drawStaticLayout(); } - if (tft_rotation == 1) { + if (isLandscape()) { // ========== LANDSCAPE 320x170 ========== // === TOP BAR === drawWifiBars(5, 3); @@ -549,12 +562,14 @@ tft.print(hashrate); // === DIFF + SHARERATE === + tft.fillRect(165, 35, 100, 16, BLACK); + tft.fillRect(165, 60, 100, 16, BLACK); tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); tft.setCursor(165, 35); - tft.print(difficulty + " "); + tft.print(difficulty); tft.setCursor(165, 60); - tft.print(sharerate + " "); + tft.print(sharerate); // === SHARES === tft.fillRect(3, 110, 20, 18, BLACK); @@ -603,19 +618,21 @@ tft.print(hashrate); // === STATS (132..194) === + tft.fillRect(5, 135, 90, 20, BLACK); tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); tft.setCursor(5, 138); - tft.print(difficulty + " "); + tft.print(difficulty); tft.setTextSize(1); tft.setTextColor(DUCO_GRAY, BLACK); tft.setCursor(100, 143); tft.print("diff"); + tft.fillRect(5, 162, 90, 20, BLACK); tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); tft.setCursor(5, 165); - tft.print(sharerate + " "); + tft.print(sharerate); tft.setTextSize(1); tft.setTextColor(DUCO_GRAY, BLACK); tft.setCursor(100, 170); From e6b3acef10946a0837db929ccd78349e146f4501 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Wed, 4 Mar 2026 10:57:51 -0300 Subject: [PATCH 43/49] fix: display of kh/s label --- ESP_Code/DisplayHal.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ESP_Code/DisplayHal.h b/ESP_Code/DisplayHal.h index 47a2e1fa..0942b8ed 100644 --- a/ESP_Code/DisplayHal.h +++ b/ESP_Code/DisplayHal.h @@ -90,14 +90,12 @@ tft.drawFastHLine(0, 28, 320, DUCO_DARK); tft.drawFastHLine(0, 105, 320, DUCO_DARK); tft.drawFastHLine(0, 140, 320, DUCO_DARK); - tft.drawFastHLine(160, 55, 155, DUCO_DARK); - tft.setTextSize(2); - tft.setCursor(160, 55); - tft.print("kH/s"); + tft.drawFastHLine(200, 55, 115, DUCO_DARK); + // diff and shr/s labels on right side (static) tft.setTextSize(1); tft.setCursor(280, 40); tft.print("diff"); - tft.setCursor(274, 60); + tft.setCursor(274, 65); tft.print("shr/s"); tft.setCursor(5, 147); tft.print("Duino-Coin " + String(SOFTWARE_VERSION)); @@ -550,7 +548,7 @@ tft.print(node + " "); // === HASHRATE === - tft.fillRect(5, 35, 150, 40, BLACK); + tft.fillRect(5, 35, 125, 40, BLACK); tft.setTextColor(DUCO_GREEN, BLACK); if (hashrate.toFloat() < 100.0) { tft.setTextSize(4); @@ -560,15 +558,20 @@ tft.setCursor(5, 45); } tft.print(hashrate); + // kH/s label redrawn every cycle (prevents it from being erased) + tft.setTextColor(DUCO_GRAY, BLACK); + tft.setTextSize(2); + tft.setCursor(135, 45); + tft.print("kH/s"); // === DIFF + SHARERATE === - tft.fillRect(165, 35, 100, 16, BLACK); - tft.fillRect(165, 60, 100, 16, BLACK); + tft.fillRect(205, 35, 70, 16, BLACK); + tft.fillRect(205, 62, 70, 16, BLACK); tft.setTextColor(WHITE, BLACK); tft.setTextSize(2); - tft.setCursor(165, 35); + tft.setCursor(210, 35); tft.print(difficulty); - tft.setCursor(165, 60); + tft.setCursor(210, 62); tft.print(sharerate); // === SHARES === From 6d63c9208aa5b875d42be47dc36b376e3426a87b Mon Sep 17 00:00:00 2001 From: jpx13 Date: Sun, 8 Mar 2026 18:55:24 +0100 Subject: [PATCH 44/49] Update README_it_IT.md removed a suspicious js miner link --- Resources/README_TRANSLATIONS/README_it_IT.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/README_TRANSLATIONS/README_it_IT.md b/Resources/README_TRANSLATIONS/README_it_IT.md index fdbc8ef3..3762d0c3 100644 --- a/Resources/README_TRANSLATIONS/README_it_IT.md +++ b/Resources/README_TRANSLATIONS/README_it_IT.md @@ -174,7 +174,6 @@ Codice sorgente del server, documentazione per chiamate API, e librerie ufficial * [STM8 DUCO Miner](https://github.com/BBS215/STM8_DUCO_miner) - firmware STM8S per minare DUCO, di BBS215 * [DuinoCoinbyLabVIEW](https://github.com/ericddm/DuinoCoinbyLabVIEW) - miner per la famiglia LabVIEW, di ericddm * [Duino-JS](https://github.com/Hoiboy19/Duino-JS) - un miner JavaScript che puoi implementare facilmente nel tuo sito, di Hoiboy19 - * [Mineuino](https://github.com/VatsaDev/Mineuino) - monetizzazione per siti web, di VatsaDev * [hauchel's duco-related stuff repository](https://github.com/hauchel/duco/) - raccolta di vario codice per minare DUCO su altri microcontrollori * [duino-coin-php-miner](https://github.com/ricardofiorani/duino-coin-php-miner) miner in PHP per Docker, di ricardofiorani * [duino-coin-kodi](https://github.com/SandUhrGucker/duino-coin-kodi) - addon di mining per Kodi Media Center, di SandUhrGucker From 0e6cfd09bfd13ef169d083b2b44185360523f46f Mon Sep 17 00:00:00 2001 From: tomasthedev Date: Tue, 28 Jul 2026 17:52:46 +0200 Subject: [PATCH 45/49] fix: getdefaultlocale depracate https://github.com/python/cpython/issues/90817 --- AVR_Miner.py | 74 ++++++++++++++++++++++++++++------------------------ PC_Miner.py | 33 ++++++++++++----------- 2 files changed, 58 insertions(+), 49 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index caf81203..77e9e11e 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -19,7 +19,7 @@ from json import load as jsonload from random import choice -from locale import LC_ALL, getdefaultlocale, getlocale, setlocale +from locale import LC_ALL, getlocale, setlocale import zipfile from re import sub @@ -508,45 +508,51 @@ def start(donation_level): try: if not Path(Settings.DATA_DIR + '/Settings.cfg').is_file(): - locale = getdefaultlocale()[0] - if locale.startswith('es'): - lang = 'spanish' - elif locale.startswith('sk'): - lang = 'slovak' - elif locale.startswith('ru'): - lang = 'russian' - elif locale.startswith('pl'): - lang = 'polish' - elif locale.startswith('de'): - lang = 'german' - elif locale.startswith('fr'): - lang = 'french' - elif locale.startswith('jp'): - lang = 'japanese' - elif locale.startswith('tr'): - lang = 'turkish' - elif locale.startswith('it'): - lang = 'italian' - elif locale.startswith('pt'): - lang = 'portuguese' - if locale.startswith("zh_TW"): + locale = getlocale()[0] + if locale.startswith("es"): + lang = "spanish" + elif locale.startswith("pl"): + lang = "polish" + elif locale.startswith("fr"): + lang = "french" + elif locale.startswith("ja"): + lang = "japanese" + elif locale.startswith("fa"): + lang = "farsi" + elif locale.startswith("mt"): + lang = "maltese" + elif locale.startswith("ru"): + lang = "russian" + elif locale.startswith("uk"): + lang = "ukrainian" + elif locale.startswith("de"): + lang = "german" + elif locale.startswith("tr"): + lang = "turkish" + elif locale.startswith("pt"): + lang = "portuguese" + elif locale.startswith("it"): + lang = "italian" + elif locale.startswith("sk"): + lang = "slovak" + elif locale.startswith("zh_Hant") or locale.startswith("zh_TW"): lang = "chinese_Traditional" - elif locale.startswith('zh'): - lang = 'chinese_simplified' - elif locale.startswith('th'): - lang = 'thai' - elif locale.startswith('az'): - lang = 'azerbaijani' - elif locale.startswith('nl'): - lang = 'dutch' - elif locale.startswith('ko'): - lang = 'korean' + elif locale.startswith("zh"): + lang = "chinese_simplified" + elif locale.startswith("th"): + lang = "thai" + elif locale.startswith("ko"): + lang = "korean" elif locale.startswith("id"): lang = "indonesian" - elif locale.startswith("cz"): + elif locale.startswith("cs"): lang = "czech" elif locale.startswith("fi"): lang = "finnish" + elif locale.startswith('az'): + lang = 'azerbaijani' + elif locale.startswith('nl'): + lang = 'dutch' else: lang = 'english' else: diff --git a/PC_Miner.py b/PC_Miner.py index c5c36494..ad6b961a 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -37,7 +37,7 @@ from platform import python_version from signal import SIGINT, signal -from locale import getdefaultlocale +from locale import getlocale from configparser import ConfigParser import io @@ -63,15 +63,18 @@ def handler(signal_received, frame): + get_string("goodbye"), "warning") - if not "raspi_leds" in user_settings: - user_settings["raspi_leds"] = "y" - - if running_on_rpi and user_settings["raspi_leds"] == "y": - # Reset onboard status LEDs - os.system( - 'echo mmc0 | sudo tee /sys/class/leds/led0/trigger >/dev/null 2>&1') - os.system( - 'echo 1 | sudo tee /sys/class/leds/led1/brightness >/dev/null 2>&1') + try: + if not "raspi_leds" in user_settings: + user_settings["raspi_leds"] = "y" + + if running_on_rpi and user_settings["raspi_leds"] == "y": + # Reset onboard status LEDs + os.system( + 'echo mmc0 | sudo tee /sys/class/leds/led0/trigger >/dev/null 2>&1') + os.system( + 'echo 1 | sudo tee /sys/class/leds/led1/brightness >/dev/null 2>&1') + except: + pass if sys.platform == "win32": _exit(0) @@ -895,14 +898,14 @@ def preload(): try: if not Path(Settings.DATA_DIR + Settings.SETTINGS_FILE).is_file(): - locale = getdefaultlocale()[0] + locale = getlocale()[0] if locale.startswith("es"): lang = "spanish" elif locale.startswith("pl"): lang = "polish" elif locale.startswith("fr"): lang = "french" - elif locale.startswith("jp"): + elif locale.startswith("ja"): lang = "japanese" elif locale.startswith("fa"): lang = "farsi" @@ -916,13 +919,13 @@ def preload(): lang = "german" elif locale.startswith("tr"): lang = "turkish" - elif locale.startswith("pr"): + elif locale.startswith("pt"): lang = "portuguese" elif locale.startswith("it"): lang = "italian" elif locale.startswith("sk"): lang = "slovak" - if locale.startswith("zh_TW"): + if locale.startswith("zh_Hant") or locale.startswith("zh_TW"): lang = "chinese_Traditional" elif locale.startswith("zh"): lang = "chinese_simplified" @@ -932,7 +935,7 @@ def preload(): lang = "korean" elif locale.startswith("id"): lang = "indonesian" - elif locale.startswith("cz"): + elif locale.startswith("cs"): lang = "czech" elif locale.startswith("fi"): lang = "finnish" From f0576d9e1cc68087d4e0e01d094ddd869ee838a4 Mon Sep 17 00:00:00 2001 From: tomasthedev Date: Tue, 28 Jul 2026 18:29:31 +0200 Subject: [PATCH 46/49] New locale fix; normalization for windows + set the locale from system --- AVR_Miner.py | 12 ++++++++++-- PC_Miner.py | 11 ++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 77e9e11e..a9f1952b 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -19,7 +19,7 @@ from json import load as jsonload from random import choice -from locale import LC_ALL, getlocale, setlocale +from locale import getlocale, setlocale, normalize, LC_ALL import zipfile from re import sub @@ -42,6 +42,7 @@ # Python <3.5 check f"Your Python version is too old. Duino-Coin Miner requires version 3.6 or above. Update your packages and try again" +setlocale(LC_ALL, "cs_CZ") def install(package): try: @@ -508,7 +509,14 @@ def start(donation_level): try: if not Path(Settings.DATA_DIR + '/Settings.cfg').is_file(): - locale = getlocale()[0] + setlocale(LC_ALL, '') + + locale_raw = getlocale()[0] + if not locale_raw: + lang = "english" + + locale = normalize(locale_raw) + if locale.startswith("es"): lang = "spanish" elif locale.startswith("pl"): diff --git a/PC_Miner.py b/PC_Miner.py index ad6b961a..6dddb0a2 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -37,7 +37,7 @@ from platform import python_version from signal import SIGINT, signal -from locale import getlocale +from locale import getlocale, setlocale, normalize, LC_ALL from configparser import ConfigParser import io @@ -50,7 +50,6 @@ # Python <3.5 check f"Your Python version is too old. Duino-Coin Miner requires version 3.6 or above. Update your packages and try again" - def handler(signal_received, frame): """ Nicely handle CTRL+C exit @@ -898,7 +897,13 @@ def preload(): try: if not Path(Settings.DATA_DIR + Settings.SETTINGS_FILE).is_file(): - locale = getlocale()[0] + setlocale(LC_ALL, '') + + locale_raw = getlocale()[0] + if not locale_raw: + lang = "english" + + locale = normalize(locale_raw) if locale.startswith("es"): lang = "spanish" elif locale.startswith("pl"): From 1d03c11dfcb04363053aa7b5e95a2b2d3a986313 Mon Sep 17 00:00:00 2001 From: tomasthedev Date: Tue, 28 Jul 2026 18:38:44 +0200 Subject: [PATCH 47/49] Remove development setlocale --- AVR_Miner.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index a9f1952b..090253d1 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -42,8 +42,6 @@ # Python <3.5 check f"Your Python version is too old. Duino-Coin Miner requires version 3.6 or above. Update your packages and try again" -setlocale(LC_ALL, "cs_CZ") - def install(package): try: pip.main(["install", package]) From 9576a07b45f4633ffb01ab7a2de2f240b6521753 Mon Sep 17 00:00:00 2001 From: tomasthedev Date: Tue, 28 Jul 2026 19:08:05 +0200 Subject: [PATCH 48/49] Added getlocale wrapper; Added windows fix for getting local code --- AVR_Miner.py | 46 +++++++++++++++++++++++++++++++++++++++------- PC_Miner.py | 44 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 76 insertions(+), 14 deletions(-) diff --git a/AVR_Miner.py b/AVR_Miner.py index 090253d1..116697d8 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -138,6 +138,44 @@ class Settings: PICK = "" COG = " @" +def get_win32_locale() -> str: + """ + Windows's alternative to getlocale + """ + from ctypes import (create_unicode_buffer, + FormatError, + GetLastError, + windll) + bufsize = 85 + buf = create_unicode_buffer(bufsize) + if windll.kernel32.GetUserDefaultLocaleName(buf, bufsize): + return buf.value + else: + raise OSError(FormatError(GetLastError())) + +def get_locale_code() -> str: + """ + Wrapper to handle getlocale for all OSes + Reaction to: https://github.com/python/cpython/issues/90817 + """ + + if os.name == 'nt': + try: + return get_win32_locale() + except: + return "english" + elif os.name == "posix": + setlocale(LC_ALL, '') + + locale_raw = getlocale()[0] + if locale_raw: + return normalize(locale_raw) + + return "english" + else: + return "english" + + def check_updates(): """ Function that checks if the miner is updated. @@ -507,13 +545,7 @@ def start(donation_level): try: if not Path(Settings.DATA_DIR + '/Settings.cfg').is_file(): - setlocale(LC_ALL, '') - - locale_raw = getlocale()[0] - if not locale_raw: - lang = "english" - - locale = normalize(locale_raw) + locale = get_locale_code() if locale.startswith("es"): lang = "spanish" diff --git a/PC_Miner.py b/PC_Miner.py index 6dddb0a2..07832548 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -191,6 +191,42 @@ class Settings: PICK = "" COG = " @" +def get_win32_locale() -> str: + """ + Windows's alternative to getlocale + """ + from ctypes import (create_unicode_buffer, + FormatError, + GetLastError, + windll) + bufsize = 85 + buf = create_unicode_buffer(bufsize) + if windll.kernel32.GetUserDefaultLocaleName(buf, bufsize): + return buf.value + else: + raise OSError(FormatError(GetLastError())) + +def get_locale_code() -> str: + """ + Wrapper to handle getlocale for all OSes + Reaction to: https://github.com/python/cpython/issues/90817 + """ + + if os.name == 'nt': + try: + return get_win32_locale() + except: + return "english" + elif os.name == "posix": + setlocale(LC_ALL, '') + + locale_raw = getlocale()[0] + if locale_raw: + return normalize(locale_raw) + + return "english" + else: + return "english" def title(title: str): if not Settings.disable_title: @@ -897,13 +933,7 @@ def preload(): try: if not Path(Settings.DATA_DIR + Settings.SETTINGS_FILE).is_file(): - setlocale(LC_ALL, '') - - locale_raw = getlocale()[0] - if not locale_raw: - lang = "english" - - locale = normalize(locale_raw) + locale = get_locale_code() if locale.startswith("es"): lang = "spanish" elif locale.startswith("pl"): From 2f0f77707f6c5bd303d3266d3afb95cbb2c540ff Mon Sep 17 00:00:00 2001 From: LDarki <51938450+LDarki@users.noreply.github.com> Date: Tue, 28 Jul 2026 15:03:55 -0300 Subject: [PATCH 49/49] fix: wrong if/elif segment --- PC_Miner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PC_Miner.py b/PC_Miner.py index 07832548..32193ba8 100644 --- a/PC_Miner.py +++ b/PC_Miner.py @@ -960,7 +960,7 @@ def preload(): lang = "italian" elif locale.startswith("sk"): lang = "slovak" - if locale.startswith("zh_Hant") or locale.startswith("zh_TW"): + elif locale.startswith("zh_Hant") or locale.startswith("zh_TW"): lang = "chinese_Traditional" elif locale.startswith("zh"): lang = "chinese_simplified"