Hello and thanks for asking.
Adapting the NodeMCU code to ESP8266 does not present any problem, it is easy ...
In the case of two buttons, the pins on the NodeMCU would be D0 and D2. On the ESP8266-01, they correspond to GPIO0 and GPIO2, which is the same as 0 and 2.
In other ESPs, it would be the same, change the Dxx pins, for the corresponding pin.
But you do this in the sketch once you have it in the Arduino IDE and before compiling.
If you need anything else, tell me.
RemoteXY - NodeMCU V3
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_1 D0
#define PIN_SWITCH_2 D2
--------
On IDE Arduino - ESP8266-01
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
#define PIN_SWITCH_1 0
#define PIN_SWITCH_2 2
What you don't know ... Question !! and what you know ... Share !! - By Joan