Nodemcu and gpio

Hey guys,

For my project I have set up a websocket connection on a nodemcu (through arduino IDE), since I am talking back and forth quite a bit with a webserver. After getting that part done, I started on the rest of the electronics for my project and quickly learned about the difficulty with io pins on the nodemcu.

For my project I need three outputs (stepper motor), one button input and one rotary encoder input (2 pins). (6 pins total)

I ran into issues during upload and booting. Would this amount of pins be possible or should I add another arduino such as nano? And while we're at it, could I then replace the nodemcu with a smaller esp8266? I am using the nodemcu as an access point, furthermore it hosts a few web pages using SPIFFS. The following example is similar to my setup.

https://tttapa.github.io/ESP8266/Chap14%20-%20WebSocket.html

What do you think fits my situation best?
1)figure out how to use the pins on the nodemcu
2)add an arduino nano, connect the boards via serial
3)replace with esp8266, serial again, any differences between esp and nodemcu I should keep in mind?

Thanks in advance!

timmie:
(6 pins total)

What do you think fits my situation best?
1)figure out how to use the pins on the nodemcu
2)add an arduino nano, connect the boards via serial
3)replace with esp8266, serial again, any differences between esp and nodemcu I should keep in mind?

NodeMCU has 11 GPIO pins, so 1) seems like a good idea.

not useable
io 6 to io 11 connect flash memory

Serial
RX io1 RX0
TX io3 TX0

boot config pins with pullup or pulldown on board
D3 io0 PULLUP (LOW for boot to flashing mode)
D4 io2 TX1 PULLUP
D8 io15 PULLDOWN (SS pin if esp8266 is SPI slave)

untroubled GPIOs with optional function for I2C or SPI bus:
D1 io5 default pin for I2C SCL
D2 io4 default pin for I2C SCA
D5 io14 SPI CLK
D6 io12 SPI MISO
D7 io13 SPI MOSI

D0 io16 optional internal pulldown, internal pullup not available

all digital GPIO start HIGH