Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/flo-bit/buttfinity. smart buttons w/ gridfinity for smart home, macropad, midi keyboard and more
flo-bit.dev/buttfinity/
···11-22-## Parts
33-44-> [!NOTE]
55-> Amazon links are to the german amazon store and are not affiliate links, just where I bought the parts, I've tried to always use the most available parts, feel free to buy elsewhere. You can also use different microcontrollers, buttons/sensors, etc, see [Creating your own lids/bins](./docs/creating-your-own-lids-bins.md) for more information.
66-77-### Microcontroller
88-99-- ESP32 D1 Mini USB C [amazon](https://amazon.de/dp/B0CJNMRG37) (recommended version, lots of pins, works as a BLE keyboard)
1010-1111-- ESP8266 D1 Mini USB C [amazon](https://amazon.de/dp/B0D9W2WM2K) (cheaper version, less pins, DOES NOT work as a BLE keyboard, only for controlling your smart home with home assistant)
1212-1313-- RP2040 Zero Mini [amazon](https://amazon.de/gp/product/B0CNSQCV9Q) (no bluetooth or wifi but works as a HID usb device)
1414-1515-### Various
1616-1717-- Magnets (6x2mm) [amazon](https://amazon.de/dp/B0DRNQT85B)
1818-- Jumper cables 10cm & 20cm [amazon](https://www.amazon.de/dp/B0CFXZDBVY)
1919-- Pin headers 2.54mm [amazon](https://www.amazon.de/dp/B07XM71CHT)
2020-2121-### Buttons/controls
2222-2323-> [!NOTE]
2424-> You don't need all of these, mix and match to your needs/preferences. If you have some other buttons/controls, feel free to [design your own lid](./docs/creating-your-own-lids-bins.md) (if you design something with a widely available part, a PR is welcome).
2525-2626-For corresponding lids, see [Lids.md](./Lids.md).
2727-2828-- MX keyswitches [amazon](https://amazon.de/dp/B0BM9KR6QH)
2929-- Self-locking push button switch 8x8mm [amazon](https://amazon.de/dp/B0D2RKL3L1)
3030-- Rotary encoder [amazon](https://amazon.de/dp/B09SG3HF9N)
3131-- Slider potentiometer 10k [amazon](https://www.amazon.de/dp/B0D6244S3Y)
3232-- Capacitive touch sensor [amazon](https://www.amazon.de/dp/B09VPK9N7F)
-71
Lids.md
···11-# Lids
22-33-## Switches
44-55-### MX key switches
66-77-> [!NOTE]
88-> the mx switch lids are too tall to be used as a lid for the bin containing the microcontroller. Either use a lid with a different sensor or a blank lid.
99-1010-#### 1x1 round mx switch
1111-1212-
1313-1414-Use with mx-switch-round-cap-23mm.
1515-1616-#### 1x1 square mx switch
1717-1818-
1919-2020-Use with mx-switch-square-cap-33x33mm.
2121-2222-#### 1x1 2 mx switches
2323-2424-
2525-2626-Use with mx-switch-square-cap-15x33mm.
2727-2828-#### 1x1 4 mx switches
2929-3030-
3131-3232-Use with mx-switch-square-cap-15x15mm.
3333-3434-#### 2x1 8 mx switches
3535-3636-
3737-3838-Use with mx-switch-square-cap-15x15mm.
3939-4040-### Self-locking 8x8mm switch
4141-4242-#### 1x1 round self-locking switch
4343-4444-
4545-4646-4747-Use with switch-lock-round-cap-23mm.
4848-4949-### Rotary encoder
5050-5151-#### 1x1 rotary encoder
5252-5353-
5454-5555-Use with rotary-encoder-cap-15mm.
5656-5757-#### 1x1 4 rotary encoders
5858-5959-
6060-6161-Use with rotary-encoder-cap-15mm.
6262-6363-### Slider potentiometer
6464-6565-Use with slider-cap-18mm.
6666-6767-#### 2x1 75mm slider potentiometer
6868-6969-
7070-7171-Use with slider-cap-18mm.
+5-9
Readme.md
···2828> [!NOTE]
2929> This documentation is for the ESP32 or ESP8266 version only, there is no tutorial for the RP2040 version yet.
30303131-1. Get the parts if you don't have them yet, see [Hardware Guide](Hardware.md)
3232-2. 3D print the bins and lids, see [3D Printing](docs/3d-printing.md)
3333-2. Install ESPHome, see [ESPHome Guide](docs/install-esphome.md)
3131+1. Get the parts if you don't have them yet, see [Hardware Guide](docs/hardware/1-Hardware.md)
3232+2. 3D print the bins and lids, see [3D Printing](docs/hardware/2-3d-printing.md)
3333+2. Install ESPHome, see [ESPHome Guide](docs/software/1-install-esphome.md)
34343. Either:
3535- - turn your Buttfinity into a BLE keyboard, see [Using as BLE Keyboard](docs/using-as-ble-keyboard.md)
3636- - or add buttons to your Home Assistant, see [Add Buttons to Home Assistant](docs/add-buttons-to-homeassistant.md)
3737-3838-## Creating your own lids/bins
3939-4040-[Creating your own lids/bins](docs/creating-your-own-lids-bins.md).
3535+ - turn your Buttfinity into a BLE keyboard, see [Using as BLE Keyboard](docs/software/2-using-as-ble-keyboard.md)
3636+ - or add buttons to your Home Assistant, see [Add Buttons to Home Assistant](docs/software/3-add-buttons-to-homeassistant.md)
41374238## Credits
4339
-13
docs/3d-printing.md
···11-# 3D Printing
22-33-Choose the lids you want to print depending on the buttons/controls you want to use, see [all available lids here](../Lids.md).
44-55-You can find the stls for all models in the `stls/` folder or get the print profile with [all lids and bins on makerworld](https://makerworld.com/en/models/1834693-buttfinity-smart-gridfinity-buttons).
66-77-You need one special bin for your microcontroller (a 1x1x5 bin with a special cutout for the microcontroller to snap into, currently there are bins for the ESP32 D1 mini, ESP8266 D1 mini and RP2040 Zero Mini), all other bins are basically normal 1x1x5 (or 2x1x5) gridfinity bins, just with some extra cutouts for the cables.
88-99-Print one of the microcontroller bins and then the same amount of other bins minus one as you have 1x1 lids (and print a 2x1x5 bin for every 2x1 lid you want).
1010-1111-You can optionally print a normal gridfinity baseplate if you want one or add magnets.
1212-1313-There are also optional plugs for the outside of your assembled module, that can be used to fill the holes in the bins.
-19
docs/add-buttons-to-homeassistant.md
···11-# Adding buttons to Home Assistant
22-33-Add buttons or similar to Home Assistant by adding sensors to you ESPHome config (in ESPHome Device Builder click "Edit").
44-55-Simple example for a button (you might have to change the pin):
66-77-```yaml
88-binary_sensor:
99- - platform: gpio
1010- pin:
1111- number: GPIO22
1212- mode: INPUT_PULLUP
1313- inverted: true
1414- name: "Button"
1515-```
1616-1717-In Home Assistant you can then go to "Settings" -> "Devices & Services", where your ESP should appear. Add it and you should see your Button as a sensor. Add automations using that button doing whatever you want it to do.
1818-1919-Other sensors work mostly the same, see [the ESPHome documentation](https://esphome.io/components/) for available sensors.
-9
docs/creating-your-own-lids-bins.md
···11-# Creating your own lids/bins
22-33-## Bins
44-55-If you have a microcontroller you want to use that doesn't yet have a bin, you can create your own by using the openscad base file `./models/bins/buttfinity-bin-base.scad`, simply add some cutouts for your microcontroller and export as stl (see `./models/bins/buttfinity-bin-esp32.scad` for an example).
66-77-## Lids
88-99-If you have a sensor or button you want to use that doesn't yet have a lid, you can create your own by using the openscad base file `./models/lids/lid-module.scad`, add some cutouts for your sensor or button and export as stl (see `./models/lids/switches/buttfinity-1x1-1-round-mx-switch-lid.scad` for an example).
-47
docs/install-esphome.md
···11-# Installing ESPHome
22-33-> [!NOTE]
44-> If you don't have Home Assistant and just want to use Buttfinity as a BLE keyboard, instead of step 1, follow [the instructions here](./installing-without-homeassistant.md).
55-66-77-1. Add ESPHome to your Home Assistant by clicking [this link](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon) and clicking "Install".
88-99-Then in ESPHome Device Builder:
1010-1111-2. Click "New Device"
1212-1313-3. Click "Continue"
1414-1515-4. Enter a name for your device and enter your Wifi name and password.
1616-1717-5. Select "ESP32" or "ESP8266" as the board (depending on your microcontroller)
1818-1919-6. Click "Skip" when asked to install to your device.
2020-2121-7. A new device should appear in the list, click "Edit" and you should see the config for your device.
2222-2323-8. If you have an ESP32, change line 5-8 to:
2424-2525-```yaml
2626-esp32:
2727- board: wemos_d1_mini32
2828- framework:
2929- type: arduino
3030-```
3131-3232-If you have an ESP8266, change line 5-6 to:
3333-3434-```yaml
3535-esp8266:
3636- board: d1_mini
3737-```
3838-3939-9. Click "Install" in the top right corner and select "Manual Download".
4040-4141-10. Wait a few minutes until it's done compiling, then select "Factory Format (Previously Modern)" as the version you want to download.
4242-4343-11. Open [ESPHome Web](https://web.esphome.io/) and click "Add Device" in the top right corner, connect your microcontroller to your computer, click "Connect", select your device.
4444-4545-12. Click "Install" and add the project you downloaded from the ESPHome Device Builder and wait until it's done installing.
4646-4747-13. From now on you can flash you microcontroller wirelessly in the ESPHome Device Builder, you can either [add buttons to connect to Home Assistant](./add-buttons-to-homeassistant.md) there or [use it as a BLE keyboard](./using-as-ble-keyboard.md)
-28
docs/installing-without-homeassistant.md
···11-# Installing ESPHome without Home Assistant
22-33-If you don't have Home Assistant you can still use Buttfinity to control your computer (as a "fake" BLE keyboard).
44-55-> [!IMPORTANT]
66-> This only works with a ESP32 D1 Mini, ESP8266 does not work as a BLE keyboard.
77-88-1. Install [ESPHome Device Builder](https://esphome.io/guides/getting_started_command_line/#esphome-device-builder-docker) by:
99-1010-- Installing [Docker](https://docs.docker.com/get-started/get-docker/) if you don't have it yet
1111-1212-- Running `ESPHome Device Builder` in a terminal:
1313-1414-if you have a mac run:
1515-```bash
1616-# MacOs
1717-docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
1818-```
1919-2020-otherwise run:
2121-```bash
2222-# On Docker, host networking mode is required for online status indicators
2323-docker run --rm --net=host -v "${PWD}":/config -it ghcr.io/esphome/esphome
2424-```
2525-2626-2. Open [`localhost:6052`](http://localhost:6052) in your browser and you should see the ESPHome dashboard.
2727-2828-Next follow the instructions to [install ESPHome](./install-esphome-on-esp.md) on your ESP32 D1 Mini, then the instructions to [simulate a BLE keyboard](./using-as-ble-keyboard.md).
-38
docs/using-as-ble-keyboard.md
···11-# Using as a BLE keyboard
22-33-> [!IMPORTANT]
44-> This only works with the ESP32 version, both ESP8266 and RP2040 are not supported, as they don't have bluetooth.
55-66-Turn your Buttfinity module into a BLE keyboard by adding the following to you ESPHome config (in ESPHome Device Builder click "Edit").
77-88-```yaml
99-external_components:
1010- - source: github://dmamontov/esphome-blekeyboard
1111-1212-ble_keyboard:
1313- id: my_ble_keyboard
1414- name: "Buttfinity BLE Keyboard"
1515- manufacturer_id: "Buttfinity"
1616- reconnect: true
1717- battery_level: 50
1818- buttons: true
1919-```
2020-2121-Now you can add buttons to your Buttfinity that will send keystrokes to your computer like this (you might have to change the pin):
2222-2323-```yaml
2424-# type "hello world" when button is pressed
2525-binary_sensor:
2626- - platform: gpio
2727- pin:
2828- number: GPIO22
2929- mode: INPUT_PULLUP
3030- inverted: true
3131- name: "Button"
3232- on_press:
3333- - ble_keyboard.print:
3434- id: my_ble_keyboard
3535- text: "hello world"
3636-```
3737-3838-See [esphome-blekeyboard](https://github.com/dmamontov/esphome-blekeyboard) for more information.
-7
docs/wiring.md
···11-# Wiring
22-33-The idea is to solder pin headers to your microcontroller and buttons/sensors.
44-55-All buttons/sensors and the microcontroller can then easily be connected and disconnected again with jumper cables.
66-77-As an alternative you can also solder jumper cables (ending in a female header) straight onto your buttons/sensors.
+32
docs/hardware/1-Hardware.md
···11+22+## Parts
33+44+> [!NOTE]
55+> Amazon links are to the german amazon store and are not affiliate links, just where I bought the parts, I've tried to always use the most available parts, feel free to buy elsewhere. You can also use different microcontrollers, buttons/sensors, etc, see [Creating your own lids/bins](./5-creating-your-own-lids-bins.md) for more information.
66+77+### Microcontroller
88+99+- ESP32 D1 Mini USB C [amazon](https://amazon.de/dp/B0CJNMRG37) (recommended version, lots of pins, works as a BLE keyboard)
1010+1111+- ESP8266 D1 Mini USB C [amazon](https://amazon.de/dp/B0D9W2WM2K) (cheaper version, less pins, DOES NOT work as a BLE keyboard, only for controlling your smart home with home assistant)
1212+1313+- RP2040 Zero Mini [amazon](https://amazon.de/gp/product/B0CNSQCV9Q) (no bluetooth or wifi but works as a HID usb device)
1414+1515+### Various
1616+1717+- Magnets (6x2mm) [amazon](https://amazon.de/dp/B0DRNQT85B)
1818+- Jumper cables 10cm & 20cm [amazon](https://www.amazon.de/dp/B0CFXZDBVY)
1919+- Pin headers 2.54mm [amazon](https://www.amazon.de/dp/B07XM71CHT)
2020+2121+### Buttons/controls
2222+2323+> [!NOTE]
2424+> You don't need all of these, mix and match to your needs/preferences. If you have some other buttons/controls, feel free to [design your own lid](./5-creating-your-own-lids-bins.md) (if you design something with a widely available part, a PR is welcome).
2525+2626+For corresponding lids, see [here](./3-Lids.md).
2727+2828+- MX keyswitches [amazon](https://amazon.de/dp/B0BM9KR6QH)
2929+- Self-locking push button switch 8x8mm [amazon](https://amazon.de/dp/B0D2RKL3L1)
3030+- Rotary encoder [amazon](https://amazon.de/dp/B09SG3HF9N)
3131+- Slider potentiometer 10k [amazon](https://www.amazon.de/dp/B0D6244S3Y)
3232+- Capacitive touch sensor [amazon](https://www.amazon.de/dp/B09VPK9N7F)
+13
docs/hardware/2-3d-printing.md
···11+# 3D Printing
22+33+Choose the lids you want to print depending on the buttons/controls you want to use, see [all available lids here](./3-Lids.md).
44+55+You can find the stls for all models in the `stls/` folder or get the print profile with [all lids and bins on makerworld](https://makerworld.com/en/models/1834693-buttfinity-smart-gridfinity-buttons).
66+77+You need one special bin for your microcontroller (a 1x1x5 bin with a special cutout for the microcontroller to snap into, currently there are bins for the ESP32 D1 mini, ESP8266 D1 mini and RP2040 Zero Mini), all other bins are basically normal 1x1x5 (or 2x1x5) gridfinity bins, just with some extra cutouts for the cables.
88+99+Print one of the microcontroller bins and then the same amount of other bins minus one as you have 1x1 lids (and print a 2x1x5 bin for every 2x1 lid you want).
1010+1111+You can optionally print a normal gridfinity baseplate if you want one or add magnets.
1212+1313+There are also optional plugs for the outside of your assembled module, that can be used to fill the holes in the bins.
+71
docs/hardware/3-Lids.md
···11+# Lids
22+33+## Switches
44+55+### MX key switches
66+77+> [!NOTE]
88+> the mx switch lids are too tall to be used as a lid for the bin containing the microcontroller. Either use a lid with a different sensor or a blank lid.
99+1010+#### 1x1 round mx switch
1111+1212+
1313+1414+Use with mx-switch-round-cap-23mm.
1515+1616+#### 1x1 square mx switch
1717+1818+
1919+2020+Use with mx-switch-square-cap-33x33mm.
2121+2222+#### 1x1 2 mx switches
2323+2424+
2525+2626+Use with mx-switch-square-cap-15x33mm.
2727+2828+#### 1x1 4 mx switches
2929+3030+
3131+3232+Use with mx-switch-square-cap-15x15mm.
3333+3434+#### 2x1 8 mx switches
3535+3636+
3737+3838+Use with mx-switch-square-cap-15x15mm.
3939+4040+### Self-locking 8x8mm switch
4141+4242+#### 1x1 round self-locking switch
4343+4444+
4545+4646+4747+Use with switch-lock-round-cap-23mm.
4848+4949+### Rotary encoder
5050+5151+#### 1x1 rotary encoder
5252+5353+
5454+5555+Use with rotary-encoder-cap-15mm.
5656+5757+#### 1x1 4 rotary encoders
5858+5959+
6060+6161+Use with rotary-encoder-cap-15mm.
6262+6363+### Slider potentiometer
6464+6565+Use with slider-cap-18mm.
6666+6767+#### 2x1 75mm slider potentiometer
6868+6969+
7070+7171+Use with slider-cap-18mm.
+7
docs/hardware/4-wiring.md
···11+# Wiring
22+33+The idea is to solder pin headers to your microcontroller and buttons/sensors.
44+55+All buttons/sensors and the microcontroller can then easily be connected and disconnected again with jumper cables.
66+77+As an alternative you can also solder jumper cables (ending in a female header) straight onto your buttons/sensors.
+9
docs/hardware/5-creating-your-own-lids-bins.md
···11+# Creating your own lids/bins
22+33+## Bins
44+55+If you have a microcontroller you want to use that doesn't yet have a bin, you can create your own by using the openscad base file `./models/bins/buttfinity-bin-base.scad`, simply add some cutouts for your microcontroller and export as stl (see `./models/bins/buttfinity-bin-esp32.scad` for an example).
66+77+## Lids
88+99+If you have a sensor or button you want to use that doesn't yet have a lid, you can create your own by using the openscad base file `./models/lids/lid-module.scad`, add some cutouts for your sensor or button and export as stl (see `./models/lids/switches/buttfinity-1x1-1-round-mx-switch-lid.scad` for an example).
+47
docs/software/1-install-esphome.md
···11+# Installing ESPHome
22+33+> [!NOTE]
44+> If you don't have Home Assistant and just want to use Buttfinity as a BLE keyboard, instead of step 1, follow [the instructions here](./4-installing-without-homeassistant.md).
55+66+77+1. Add ESPHome to your Home Assistant by clicking [this link](https://my.home-assistant.io/redirect/supervisor_addon/?addon=5c53de3b_esphome&repository_url=https%3A%2F%2Fgithub.com%2Fesphome%2Fhome-assistant-addon) and clicking "Install".
88+99+Then in ESPHome Device Builder:
1010+1111+2. Click "New Device"
1212+1313+3. Click "Continue"
1414+1515+4. Enter a name for your device and enter your Wifi name and password.
1616+1717+5. Select "ESP32" or "ESP8266" as the board (depending on your microcontroller)
1818+1919+6. Click "Skip" when asked to install to your device.
2020+2121+7. A new device should appear in the list, click "Edit" and you should see the config for your device.
2222+2323+8. If you have an ESP32, change line 5-8 to:
2424+2525+```yaml
2626+esp32:
2727+ board: wemos_d1_mini32
2828+ framework:
2929+ type: arduino
3030+```
3131+3232+If you have an ESP8266, change line 5-6 to:
3333+3434+```yaml
3535+esp8266:
3636+ board: d1_mini
3737+```
3838+3939+9. Click "Install" in the top right corner and select "Manual Download".
4040+4141+10. Wait a few minutes until it's done compiling, then select "Factory Format (Previously Modern)" as the version you want to download.
4242+4343+11. Open [ESPHome Web](https://web.esphome.io/) and click "Add Device" in the top right corner, connect your microcontroller to your computer, click "Connect", select your device.
4444+4545+12. Click "Install" and add the project you downloaded from the ESPHome Device Builder and wait until it's done installing.
4646+4747+13. From now on you can flash you microcontroller wirelessly in the ESPHome Device Builder, you can either [add buttons to connect to Home Assistant](./3-add-buttons-to-homeassistant.md) there or [use it as a BLE keyboard](./2-using-as-ble-keyboard.md)
+38
docs/software/2-using-as-ble-keyboard.md
···11+# Using as a BLE keyboard
22+33+> [!IMPORTANT]
44+> This only works with the ESP32 version, both ESP8266 and RP2040 are not supported, as they don't have bluetooth.
55+66+Turn your Buttfinity module into a BLE keyboard by adding the following to you ESPHome config (in ESPHome Device Builder click "Edit").
77+88+```yaml
99+external_components:
1010+ - source: github://dmamontov/esphome-blekeyboard
1111+1212+ble_keyboard:
1313+ id: my_ble_keyboard
1414+ name: "Buttfinity BLE Keyboard"
1515+ manufacturer_id: "Buttfinity"
1616+ reconnect: true
1717+ battery_level: 50
1818+ buttons: true
1919+```
2020+2121+Now you can add buttons to your Buttfinity that will send keystrokes to your computer like this (you might have to change the pin):
2222+2323+```yaml
2424+# type "hello world" when button is pressed
2525+binary_sensor:
2626+ - platform: gpio
2727+ pin:
2828+ number: GPIO22
2929+ mode: INPUT_PULLUP
3030+ inverted: true
3131+ name: "Button"
3232+ on_press:
3333+ - ble_keyboard.print:
3434+ id: my_ble_keyboard
3535+ text: "hello world"
3636+```
3737+3838+See [esphome-blekeyboard](https://github.com/dmamontov/esphome-blekeyboard) for more information.
+19
docs/software/3-add-buttons-to-homeassistant.md
···11+# Adding buttons to Home Assistant
22+33+Add buttons or similar to Home Assistant by adding sensors to you ESPHome config (in ESPHome Device Builder click "Edit").
44+55+Simple example for a button (you might have to change the pin):
66+77+```yaml
88+binary_sensor:
99+ - platform: gpio
1010+ pin:
1111+ number: GPIO22
1212+ mode: INPUT_PULLUP
1313+ inverted: true
1414+ name: "Button"
1515+```
1616+1717+In Home Assistant you can then go to "Settings" -> "Devices & Services", where your ESP should appear. Add it and you should see your Button as a sensor. Add automations using that button doing whatever you want it to do.
1818+1919+Other sensors work mostly the same, see [the ESPHome documentation](https://esphome.io/components/) for available sensors.
···11+# Installing ESPHome without Home Assistant
22+33+If you don't have Home Assistant you can still use Buttfinity to control your computer (as a "fake" BLE keyboard).
44+55+> [!IMPORTANT]
66+> This only works with a ESP32 D1 Mini, ESP8266 does not work as a BLE keyboard.
77+88+1. Install [ESPHome Device Builder](https://esphome.io/guides/getting_started_command_line/#esphome-device-builder-docker) by:
99+1010+- Installing [Docker](https://docs.docker.com/get-started/get-docker/) if you don't have it yet
1111+1212+- Running `ESPHome Device Builder` in a terminal:
1313+1414+if you have a mac run:
1515+```bash
1616+# MacOs
1717+docker run --rm -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true -v "${PWD}":/config -it ghcr.io/esphome/esphome
1818+```
1919+2020+otherwise run:
2121+```bash
2222+# On Docker, host networking mode is required for online status indicators
2323+docker run --rm --net=host -v "${PWD}":/config -it ghcr.io/esphome/esphome
2424+```
2525+2626+2. Open [`localhost:6052`](http://localhost:6052) in your browser and you should see the ESPHome dashboard.
2727+2828+Next follow the instructions to [install ESPHome](./1-install-esphome.md) on your ESP32 D1 Mini, then the instructions to [simulate a BLE keyboard](./2-using-as-ble-keyboard.md).