Skip to content

Instantly share code, notes, and snippets.

@glmnet
Last active February 4, 2026 13:44
Show Gist options
  • Select an option

  • Save glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d to your computer and use it in GitHub Desktop.

Select an option

Save glmnet/49ca3d6a9742fc3649f4fbdeaa4cdf5d to your computer and use it in GitHub Desktop.
// this gist is no longer needed,
// see https://github.com/glmnet/esphome-components/blob/main/docs/arduino_port_extender.md
// for up to date information
// this gist is no longer needed,
// see https://github.com/glmnet/esphome-components/blob/main/docs/arduino_port_extender.md
// for up to date information
@lencol
Copy link

lencol commented Dec 29, 2025

Hi @thebradleysanders Arduino Mega 2560 is not working properly in latest esphome. During compile getting continuous error with arduino_port_expander.h file. Please look into it for resolution.

Error as per below-: In file included from src/main.cpp:610: /config/esphome/waveshare-esp32-s3.yaml: In lambda function: /config/esphome/waveshare-esp32-s3.yaml:291:33: error: 'expander1' is not captured 291 | return {ape_binary_output(expander1, 48), | ....
...
std::vector<Component > { | ^~~~~~~~~ /config/esphome/waveshare-esp32-s3.yaml:296:47: error: could not convert '{, , , , , }' from '' to 'std::vectoresphome::output::BinaryOutput' 296 | ape_binary_output(expander1, 13)}; | ^ | | |

I have the same problem, did you manage to fix it?

@sonulgupta
Copy link

sonulgupta commented Feb 4, 2026

Yes. I fixed it up. Sorry for the delay in reply. Need some changes in the "arduino_port_expander.h" file & esphome codes also need to be changed.
For "arduino_port_expander.h" file, please refer below link-:
https://gist.github.com/sonulgupta/4c1806dd702cb84fce3b9eddcd0b4d06#file-arduino_port_expander-h
For Esphome coding changes, please refer below link-:
https://gist.github.com/sonulgupta/4c1806dd702cb84fce3b9eddcd0b4d06#file-esphome-codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment