Turn your LoctekMotion/FlexiSpot standing desk into a smart desk!

I spoke with imick and the ethernet cable color column was added by a contributor. I think that the “original cable color” were the colors that were with imick’s cable, and what they corresponded to in the pins at the connector. Since the last column (T568B) follows the standard, I think thats what I’m going to use. As long as I line them up with the “Name” column to the cable color in the last column, and then match that with the second screenshot on the pinouts, I should be good.

However, ESP32 has different pinouts than ESP8266. I’ve been researching this and trying to take a crash course in arduino, and I think I might be close? I’m still waiting for my duponts to arrive to confirm it. From my research, I ESP8266 uses certain pins for certain functions. The four we need are:
GND - Ground
D5 - GPIO14 / SCLK (Slave Clock - but we have this mapped to TX for transmit.
D6 - GPIO12 - MISO (Master in, slave out - which I read as communication from the slave device to the ESP, we have this mapped to RX for Receive, so I think we’re good here.)
D2 - GPIO4 - SDA (Serial Data Pin, where communication is sent back and forth between the devices)

From my research, you can set (certain) GPIO pins to be whatever you want. I think I need to add the following to my yaml file for ESPHome to match the original ESP8226 config?

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12

uart:
  id: desk_uart
  baud_rate: 9600
  tx_pin: GPIO14 
  rx_pin: GPIO12

And then I need to set an SDA pin.

i2c:
  sda: 21
  scl: 22
  scan: True
  id: bus_a

This should default the sda to GPIO21. I’d then replace this in the yaml where D2 is listed.


switch:
  - platform: gpio
    name: "Virtual Screen"
    pin:
      number: GPIO21
      i2c_id: bus_a # Don't know if I need to define this here...
      mode: OUTPUT
    restore_mode: ALWAYS_OFF
    internal: true

Hopefully I’m on the right track!