T-vK / ESP32-BLE-Keyboard

Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
2.28k stars 379 forks source link

LIbray Size #187

Open saulc opened 1 year ago

saulc commented 1 year ago

I used this to convert one of my project from usb hid to ble. its working great but the big problem is the compilation size is over 80% (~1066721 bytes) on a feather v2 esp32.

Which means I can't even include the sleep or even wifi lib to disable it and reduce power use. current battery life on 600ma is bad.

Anyway to do a more lightweight version?

ekoslav commented 1 year ago

Have you tried different partition scheme?

2022-09-03 14_50_41-ESP32_4x4MatKBD_SPIFS _ Arduino 1 8 19

saulc commented 1 year ago

Thanks! it seemed weird to hit the memory limit on this thing...I only had 2 options for my board Screen Shot 2022-09-03 at 12 40 45 PM

1075517 bytes (51%) - > 1454461 bytes (69%) with wifi disabled!

Nice work on the library. switching from hid keyboard was just find/replace and then add a device name and update the battery %.

Now that I think about it is there any way to show charging or low battery?

T-vK commented 1 year ago

Check the Readme for NimBLE-Mode.