Cleaned up libs

This commit is contained in:
ToTo 2023-12-31 09:40:46 +02:00
commit 207704e621
13 changed files with 122 additions and 51 deletions

View File

@ -91,7 +91,7 @@ Update NerdMiner firmware following same flashing steps but only using the file
After programming, you will only need to setup your Wifi and BTC address.
#### Wifi Accesspoint
#### Wifi Configuration
1. Connect to NerdMinerAP
- AP: NerdMinerAP
@ -133,6 +133,7 @@ Recommended low difficulty share pools:
| pool.nerdminer.io | 3333 | https://nerdminer.io | Mantained by CHMEX |
| pool.vkbit.com | 3333 | https://vkbit.com/ | Mantained by djerfy - public-pool fork |
| pool.pyblock.xyz | 3333 | https://pool.pyblock.xyz/ | Mantained by curly60e |
| pool.sethforprivacy.com | 3333 | https://pool.sethforprivacy.com/ | Mantained by @sethforprivacy - public-pool fork |
Other standard pools not compatible with low difficulty share:
@ -174,7 +175,7 @@ With the USB-C port to the right:
### Project guidelines
- Current project was addapted to work with PlatformIO
- Current project was adapted to work with PlatformIO
- Current project works with ESP32-S3 and ESP32-wroom.
- Partition squeme should be build as huge app
- All libraries needed shown on platform.ini
@ -198,7 +199,7 @@ With the USB-C port to the right:
- [x] Add support to TTGO T-display 1.14
- [x] Add support to Amoled
### On process
### In process
- [ ] Create a daisy chain protocol via UART or I2C to support ESP32 hashboards
- [ ] Create new screen like clockMiner but with BTC price

Binary file not shown.

View File

@ -0,0 +1,6 @@
#GET CURRENT COMPORT IF MORE THAN ONE (NOT RESOLVED)
$PORT = [System.IO.Ports.SerialPort]::getportnames()
#BURN BOOTLOADER, FIRMWARE
python -m esptool -p $PORT -b 460800 --before default_reset --after hard_reset --chip esp32s3 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x0000 0x0000_bootloader.bin 0x8000 0x8000_partitions.bin 0xe000 0xe000_boot_app0.bin 0x10000 0x10000_firmware.bin

View File

@ -7,11 +7,10 @@
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
; M5Stick-C, esp32cam, ESP32-2432S028R, NerminerV2, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact
[platformio]
globallib_dir = lib
default_envs = M5Stick-C
default_envs = M5Stick-C, esp32cam, ESP32-2432S028R, NerminerV2, ESP32-devKitv1, NerminerV2-S3-DONGLE, NerminerV2-S3-AMOLED, NerminerV2-T-QT, NerdminerV2-T-Display_V1, ESP32-2432S028R, M5-StampS3, ESP32-S3-devKitv1, ESP32-S3-mini-wemos, ESP32-S3-mini-weact, ESP32-C3-devKitmv1, ESP32-C3-super-mini
[env:M5Stick-C]
platform = espressif32
@ -59,7 +58,8 @@ build_flags =
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D S3MINIWEMOS=1
-D ESP32RGB=1
-D RGB_LED_PIN=47
;-D DEBUG_MINING=1
lib_deps =
https://github.com/takkaO/OpenFontRender
@ -70,7 +70,6 @@ lib_deps =
https://github.com/FastLED/FastLED
lib_ignore =
TFT_eSPI
;--------------------------------------------------------------------
;--------------------------------------------------------------------
@ -90,7 +89,8 @@ build_flags =
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D S3MINIWEACT=1
-D ESP32RGB=1
-D RGB_LED_PIN=48
;-D DEBUG_MINING=1
lib_deps =
https://github.com/takkaO/OpenFontRender
@ -103,6 +103,66 @@ lib_ignore =
TFT_eSPI
;--------------------------------------------------------------------
[env:ESP32-C3-super-mini]
platform = espressif32
board = seeed_xiao_esp32c3
framework = arduino
monitor_filters =
esp32_exception_decoder
time
log2file
monitor_speed = 115200
upload_speed = 115200
board_build.partitions = huge_app.csv
build_flags =
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D DEVKITV1=1
-D PIN_BUTTON_1=9
-D LED_PIN=8
;-D DEBUG_MINING=1
lib_deps =
https://github.com/takkaO/OpenFontRender
bblanchon/ArduinoJson@^6.21.2
https://github.com/tzapu/WiFiManager.git#v2.0.16-rc.2
mathertel/OneButton @ ^2.0.3
arduino-libraries/NTPClient
lib_ignore =
TFT_eSPI
;--------------------------------------------------------------------
[env:ESP32-C3-devKitmv1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_filters =
esp32_exception_decoder
time
log2file
monitor_speed = 115200
upload_speed = 115200
board_build.partitions = huge_app.csv
build_flags =
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D ESP32RGB=1
-D PIN_BUTTON_1=9
-D RGB_LED_PIN=8
;-D DEBUG_MINING=1
lib_deps =
https://github.com/takkaO/OpenFontRender
bblanchon/ArduinoJson@^6.21.2
https://github.com/tzapu/WiFiManager.git#v2.0.16-rc.2
mathertel/OneButton @ ^2.0.3
arduino-libraries/NTPClient
https://github.com/FastLED/FastLED
lib_ignore =
TFT_eSPI
;--------------------------------------------------------------------
[env:ESP32-S3-devKitv1]
platform = espressif32
board = esp32-s3-devkitc-1
@ -119,7 +179,8 @@ build_flags =
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1
-D DEVKITV1RGB=1
-D ESP32RGB=1
-D RGB_LED_PIN=48
;-D DEBUG_MINING=1
lib_deps =
https://github.com/takkaO/OpenFontRender
@ -400,6 +461,7 @@ lib_deps =
https://github.com/tzapu/WiFiManager.git#v2.0.16-rc.2
mathertel/OneButton @ ^2.0.3
arduino-libraries/NTPClient
https://github.com/FastLED/FastLED
lib_ignore =
TFT_eSPI
SD

View File

@ -40,6 +40,12 @@ const char* ntpServer = "pool.ntp.org";
/********* INIT *****/
void setup()
{
//Init pin 15 to eneble 5V external power (LilyGo bug)
#ifdef PIN_ENABLE5V
pinMode(PIN_ENABLE5V, OUTPUT);
digitalWrite(PIN_ENABLE5V, HIGH);
#endif
#ifdef MONITOR_SPEED
Serial.begin(MONITOR_SPEED);
#else

View File

@ -23,12 +23,8 @@
#include "esp32CAM.h"
#elif defined(M5_STAMP_S3)
#include "m5StampS3.h"
#elif defined(DEVKITV1RGB)
#include "esp32DevKitRGB.h"
#elif defined(S3MINIWEMOS)
#include "esp32S3MiniWemos.h"
#elif defined(S3MINIWEACT)
#include "esp32S3MiniWeact.h"
#elif defined(ESP32RGB)
#include "esp32RGB.h"
#else
#error "No device defined"

View File

@ -1,8 +1,13 @@
#ifndef _ESP32_DEV_KIT_H
#define _ESP32_DEV_KIT_H
#ifndef PIN_BUTTON_1
#define PIN_BUTTON_1 0
#endif
#ifndef LED_PIN
#define LED_PIN 2
#endif
#define NO_DISPLAY

View File

@ -1,10 +0,0 @@
#ifndef _ESP32_DEV_KIT_RGB_H
#define _ESP32_DEV_KIT_RGB_H
#define PIN_BUTTON_1 0
#define RGB_LED_PIN 48
#define LED_DISPLAY
#define USE_LED
#endif

View File

@ -0,0 +1,24 @@
#ifndef _ESP32_RGB_H
#define _ESP32_RGB_H
#ifndef PIN_BUTTON_1
#define PIN_BUTTON_1 0
#endif
#ifndef RGB_LED_PIN
#define RGB_LED_PIN 48
#endif
#ifndef RGB_LED_CLASS
#define RGB_LED_CLASS WS2812B
#endif
#ifndef RGB_LED_ORDER
#define RGB_LED_ORDER BGR
#endif
#define LED_DISPLAY
#define USE_LED
#endif

View File

@ -1,10 +0,0 @@
#ifndef _ESP32_S3_MINI_WEACT_H
#define _ESP32_S3_MINI_WEACT_H
#define PIN_BUTTON_1 0
#define RGB_LED_PIN 48
#define LED_DISPLAY
#define USE_LED
#endif

View File

@ -1,10 +0,0 @@
#ifndef _ESP32_S3_MINI_WEMOS_H
#define _ESP32_S3_MINI_WEMOS_H
#define PIN_BUTTON_1 0
#define RGB_LED_PIN 47
#define LED_DISPLAY
#define USE_LED
#endif

View File

@ -2,8 +2,9 @@
#define _M5_STAMP_S3_H
#define PIN_BUTTON_1 0
#define LED_PIN 9
#define RGB_LED_PIN 21
#define NO_DISPLAY
#define LED_DISPLAY
#define USE_LED
#endif

View File

@ -28,7 +28,7 @@ void ledDisplay_Init(void)
{
Serial.println("Led display driver initialized");
#ifdef USE_LED
FastLED.addLeds<WS2812B, RGB_LED_PIN, BGR>(&leds, 1);
FastLED.addLeds<RGB_LED_CLASS, RGB_LED_PIN, RGB_LED_ORDER>(&leds, 1);
FastLED.show();
#endif // USE_LED
}