Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By joshbg2k
#62237 I'm working on a device that requires control of 10 components, which I'm trying to do by configuring 10 GPIO pins on a NodeMCU board. For now we are using the NodeMCU just as a serial device; we send serial data from a desktop app, and the Node MCU responds but setting the various IO pins to HIGH. I think I'm almost there. I've had trouble reconfiguring both TX and RX pins and getting both to work at the same time, so for now I've ignored the RX pins and set up my TX pins by setting the pin mode like this, according to the [url="http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations"]pin function chart[/url]:

Code: Select allpinMode(DEVICE, FUNCTION_3);


I think I am hitting the limit of pins available as regular Arduino-style digital IO pins. Without the apparently disabled RX pins, and my failed attempt to configure GPIO9 and GPIO10 as digital outputs, I'm left with GPIO16, which I've configured as RTC_GPIO0, or Function 1 on the chart.

Code: Select allpinMode(ANOTHER_DEVICE, FUNCTION_1);


So I have a few questions. Given my need for 10 digital outputs, is this the best way to go? Is it even possible to use 10 digital outputs at the same time with my application? Is there a list somewhere of which pins do and do not work is general digital IO pins? If it's not sensible to try to use 10 pins as digital IO I need to start looking at other ways to do it via a multiplexer, etc. Thanks.
User avatar
By Barnabybear
#62250 Hi, an I2C port expander on GPIO 0 and 2 might be the best option - lots listed on the forum.
GPIO's 0, 1, 2, 3, 4, 5, 12, 13, 14, 15, & 16 are all useable as outputs. Both Tx and Rx should work as GPIO's, what are you controlling?
User avatar
By torntrousers
#62253
Barnabybear wrote:GPIO's 0, 1, 2, 3, 4, 5, 12, 13, 14, 15, & 16 are all useable as outputs. Both Tx and Rx should work as GPIO's, what are you controlling?


And GPIO 10 when using DIO mode, right? (DIO is the default mode on many modules, eg NodeMCU v1.0, Wemos D1 mini)
User avatar
By joshbg2k
#62258
Barnabybear wrote:Hi, an I2C port expander on GPIO 0 and 2 might be the best option - lots listed on the forum.
GPIO's 0, 1, 2, 3, 4, 5, 12, 13, 14, 15, & 16 are all useable as outputs. Both Tx and Rx should work as GPIO's, what are you controlling?


I'm controlling 10 SLR cameras, with optocouplers to isolate the circuits. I've tried a couple different NodeMCU modules and can't seem to get RX to fire on any of them. I will definitely check out the port sxpander.