Configuring 10 pins as Digital Outputs
Posted: Tue Feb 07, 2017 6:07 pm
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]:
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.
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.
Code: Select all
pinMode(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 all
pinMode(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.