hello and thanks for the help in advance im brand new so please take it a little easy on me,im trying to have a pin from the esp8266 read the input of a button then turn on the led on a different pin of the esp,the problem is im trying to figure out what off and on is ? does HIGH mean ON and LOW mean OFF? or vice versa because whenever i ask if pin is high turn on led it is always reading the pin as high and whenever i tell it to turn led on if low it never reads the button as high so the real problem is i guess its not reading the button press at all?
below is a picture of my wiring again thanks in advance =)
and also i know about external resistor and pullup/pull down resistors and when ive used the on board pull up and pull down i receive more success but im trying to get the fundementals down first and i know in the future not all boards i work with will have built in resistors on the pins i need,i also head that the esp has "inverted logic" so i think that may also be the cause of my aliment please help me not go crazy thank you
my wiring is like this but with a esp8266 on gpio 10
If not then it sounds like GND and 3V3 will be shorted when the button is pressed. At best this will reset the board. At worst it will damage the board
For clarification please post a diagram of your wiring. A photo of a hand drawn circuit is good enough
The resistor will prevent the direct short but are you sure that you have the switch connected correctly ?
The button pins are in pairs and you may have used a pair of connected pins, hence no switch action. To be sure that that you have actually connected to a pair of switched pins use two diagonally opposite pins on the switch
The easy way is to check it programmatically, sending a signal if either HIGH or LOW, but from your schematic. Un-pressed the pinstate should read LOW, pressed it should read HIGH.
The issuse is when i ask the code to read high it reads high no matter what,if pressed or not it doesnt matter and when i ask it to read low it never registers the press it always ignores the if clause and nothing happens
The diagram does not show that. Any 2 adjacent pins on such a button could be either permanently connected or switched. Personally I would use diagonally opposite pins to be sure
Yes it sd3 or GPIO 10 the code i am using is a button basic code from the arduino sketechbook example sorry cant upload right now im on mobile but it is basic sketch