Report Bugs Here

Moderator: Mmiscool

User avatar
By forlotto
#37664 I notice upon power up with GPIO's connected to a relay board it will not grab or transmit a connection.

The GPIO's being used are D1 -D8 Basic Wifi Dev Board.

Any ideas as to why this would happen or possibly what GPIO would be causing this conflict.

2AMPS of power @ 5v being delivered to power the Basic Wifi Dev Board and the board but I have a hunch that it is not a power issue I think it is a GPIO issue.

Reason: I can hook up both the power from the unit and a usb cable and the same problem occurs however if I hook up the nodemcu to power which is tied to the relay board then I hook up GPIO's it works fine no problems.

So for whatever reason there is a GPIO conflict upon boot.

This is the relay board being used:
Image

This is the Basic Wifi Dev Board I am using:

Image

found here: http://www.esp8266basic.com/store/p1/ES ... Board.html
Last edited by forlotto on Sat Jan 02, 2016 5:36 pm, edited 3 times in total.
User avatar
By forlotto
#37666 OK so upon further investigation I noticed something

GPIO D3 is held open low when it is first powering up.

After I hook up GPIO pins D8 is held low open.

For the Basic Wifi Dev Board and the relay board it would be the same as setting the pin to " 0 " holding it low.
Last edited by forlotto on Sun Jan 03, 2016 12:03 am, edited 2 times in total.
User avatar
By forlotto
#37738 Is this why LUA uses SD2 and SD3 as GPIO's as well a rather curious thing to ponder for me going to give RX and TX a try here in a bit....
This is the gpio lookup for LUA firmware
Code: Select all gpiolookup = {[0]=3,[1]=10,[2]=4,[3]=9,[4]=2,[5]=1,[9]=11,[10]=12,[12]=6,[13]=7,[14]=5,[15]=8,[16]=0

in brackets is the GPIO the number is the pin number is the number after the = sign used for code.
Notice how GPIO 9 and 10 are used

Here is basic:
Code: Select all if (PinDesignaor == "D0")  pin = 16;
  if (PinDesignaor == "D1")  pin = 5;
  if (PinDesignaor == "D2")  pin = 4;
  if (PinDesignaor == "D3")  pin = 0;
  if (PinDesignaor == "D4")  pin = 2;
  if (PinDesignaor == "D5")  pin = 14;
  if (PinDesignaor == "D6")  pin = 12;
  if (PinDesignaor == "D7")  pin = 13;
  if (PinDesignaor == "D8")  pin = 15;
  if (PinDesignaor == "RX")  pin = 3;
  if (PinDesignaor == "TX")  pin = 1;




GPIO's USED BASIC/LUA
GPIO- Used For Basic / Used For LUA this is the format of the table:
GPIO 0- Used for Both
GPIO 1- Used for Both
GPIO 2- Used for Both
GPIO 3- Used for Both
GPIO 4- Used for Both
GPIO 5- Used for Both
GPIO 6- NOT Used for Both
GPIO 7- NOT Used for Both
GPIO 8- NOT Used for Both
GPIO 9- Used On LUA Only
GPIO 10- Used On LUA Only
GPIO 11- NOT Used for Both
GPIO 12- Used for Both
GPIO 13- Used for Both
GPIO 14- Used for Both
GPIO 15- Used for Both
GPIO 16- Used for Both
ADC0 A0- Used Only For Basic <---- This may be incorrect but technically it is not a GPIO!

So all the GPIO's in LUA are used in Basic but LUA has 2 more GPIO's according to the table:
https://github.com/nodemcu/nodemcu-firm ... w_gpio_map
Note I did add pin 9 because it wasn't in the lookup on the wiki but it was in the table dunno if this is normal or an error in documentation on LUA's part?

Anyhow just some info on trying to unravel the full workings and mystery of what is going on here figured it may be useful to know these things as well.
User avatar
By forlotto
#37749 Am I correct with these findings I suppose I could test and see if GPIO 9 and 10 work.

Still need to make the switch to RX and TX and see if this fixes the issue... Or just temporarily comment out GPIO 3 test it out and then comment out GPIO8 and try it out and if that doesen't work try both or possibly purchase another board to be sure it is not the relay board causing the issue as well I'll give it time and try to talk myself through the issue and find a solution or work around for it.

Thanks for viewing I know it is difficult for most to answer as they can not see it or don't have the same hardware but figured I would do this more to talk myself through the issue and second to document that there is an issue as well.

Anyhow to those reading and curious stay tuned I can be kind of methodical and sloooooow at doing this stuff apologies to those reading it is the way I operate similar to a flow chart gotta follow all the arrows lol! If it ain't this its that if it ain't that its this :P

Just take it as an update to thought process no need to answer questions if you are pressed for time more so thinking out loud.

EDIT UPDATE THEY MAY BE PINS FOR SD CARD READER ? need too look into this further as I said not gospel!

But the question still exists why does LUA use these pins for GPIO?
Last edited by forlotto on Sun Jan 03, 2016 1:24 pm, edited 1 time in total.