-->
Page 1 of 1

What are the correct pin-outs for ESP8266 12F ?

PostPosted: Sun Mar 19, 2017 7:28 pm
by Espradio01
Hi there

I am using and ESP8266 12F which I can successfully program using arduino ide version 1.65.
When running the code bits below , only GPIO2 ever goes High.(or low based on code change).

My question is :
How can I access the rest of the pins eg GPIO4 ?

Where can I fix the issuse ? (is it pin mappings that are missing ?

I hope someone can shed some light and/or help me as I would love it if I could access all GPIO's.

Thank you
D


Code: Select allint ledPin = 2;
int relayPin = 4;

pinMode(ledPin, OUTPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // wait
digitalWrite(relayPin, HIGH); // sets the LED on
delay(1000); // wait
digitalWrite(relayPin, LOW); // sets the LED off
delay(1000); // wait

Re: What are the correct pin-outs for ESP8266 12F ?

PostPosted: Sun Mar 19, 2017 7:59 pm
by Espradio01
Espradio01 wrote:Hi there

I am using and ESP8266 12F which I can successfully program using arduino ide version 1.65.
When running the code below , only GPIO2 and GPIO4 go High or low based on code change.
That's great but the pin mappings don't match what is shown on the diagram for the 12 series on the github page.

My question is :
Does anyone have a corret mapping diagram and/or know where I can check the mappings for correctness ?

I hope someone can shed some light and/or help me as I would love it if I could access all GPIO's.

Thank you
D


Code: Select allint ledPin = 2;
int relayPin = 4;

pinMode(ledPin, OUTPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // wait
digitalWrite(relayPin, HIGH); // sets the LED on
delay(1000); // wait
digitalWrite(relayPin, LOW); // sets the LED off
delay(1000); // wait


EDIT :
this all works .. I was measuring the wrong pin :-)