Here is the answer: All pins corresponding to the G row are connected to ground. All Pins corresponding to the V row are connected to NodeMCU's 3V3 pin.

D row pins tagged from 0 to 8 correspond to NodeMCU's D1-D8 pins. D row pins tagged with SD2, SD3 corresponds to NodeMCU's SD2, SD3 pin UTART/SPI section:

Tags corresponding to the pins are self explanatory. Near the white-colored power switch we have a pin called "AD". I couldn't figure how this motor shield's "AD" pin is interfaced to NodeMCU. Do you have any idea?

Following on Basic Question - ESP8266 Board Pins, I can't seem to map the pins on its motor shield to software (the ones named UART/SPI, the GPIOs and the Analog Inputs). See the third image, with a NodeMCU installed.

Motor Shield

The GPIOs seem to conflict with the motors on Arduino, and I have no idea what to do here. Documentation is pretty much useless.

enter image description here

  • This question is about a ESP8266 and this is the Arduino SE forum, you might try the Electronics SE forum, there are more ESP8266 users over there so you will get a better/quicker answer. Personally I would buzz them back to the socket for the NodeMCU and then use them from there Jan 17, 2017 at 8:35
  • Hello @Matt , thanks for the answer, but the question is actually about the code, and how to map the code to the physical pins, that's why I posted it here. Sorry if it was the wrong place! Jan 17, 2017 at 9:36
  • Which forum it should be depends if you are programing the ESP via the Arduino IDE or in LUA. The same still hold true though, you need to know what pins the software needs to address, so you need to find out what pins on the board connect to your ESP. Then you just need to use the correct constant. So if GPIO_0 (Yellow box) connects to D0 on your breakout board then your code needs to refer to GPIO-16, Obs :) Have you seen this before?pradeepsinghblog.files.wordpress.com/2016/04/… Jan 17, 2017 at 12:12
  • BTW Majenko is saying the same thing, hint hint. Jan 17, 2017 at 12:13

1 Answer 1


You see the pins marked PWMA, PWMB, DA and DB? Those are the pins that control the motors (PWMx is the speed, Dx is the direction). Whatever pins on your ESP8266 board plug into those holes are the pins you need to use in your code. How those pins map to names and numbers in the Arduino API depends entirely on what the board is you're plugging in and what the author of the board definition files was thinking at the time.

In short, look at your board (which we cannot see) and see what GPIO pins are in the same location as the pins I pointed out. Then control those pins in your software.

  • thanks for your answer. As specified on the question, the board is a ESP8266, the NodeMCU. Actually, I was asking about the pins marked as SD2, SD3, and 0 to 8, with rows marked D, G and V. The ones that control the motors I managed to use. Jan 17, 2017 at 12:46
  • @AlexandreStrube Then read the manual for the NodeMCU? That will tell you which pins on the ESP8266 module those pins (which are clearly labelled the same on the NodeMCU) are connected to.
    – Majenko
    Jan 17, 2017 at 13:09
  • @AlexandreStrube - You should have SD0 to SD3 on your NodeMCU (On the analog pin side) - They are normally controlled in the software by SDD0 to SDD3. The 0 to 8 pins, well you have pins marked D0 to D8 and I am going to guess the on your motor shield they are connected to 0D to 8D, in software they are controlled by GPIO1 to GPIO16 - see the link in my comment above. You can prove this by writing an app the lights an LED and toggling each of the pins high in sequence, or you could use a multimeter and buzz it out. Once you know the physical connections working out the s/w should be easy. Jan 18, 2017 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.