FireBeetle ESP8266 GPIO Pins

userHead Dayane69 2023-05-23 21:45:08 550 Views2 Replies

Can we use the pins for SCK, MOSI, MISO, SDA and SCL for output or input pins ? (I014, I013, I012, I04, I05)

 

Thank you !

2023-05-25 10:57:50

Yes, SCK (clock), MOSI (master data output/slave data input), MISO (master data input/slave data output), SDA (I2C data line), and SCL (I2C clock line) pins of ESP8266 Pins can be used as digital pins. You can configure them as digital inputs or outputs and control their high and low states.

 

SCK - GPIO14MOSI - GPIO13MISO - GPIO12SDA - GPIO4SCL - GPIO5

 

For example:In the Arduino IDE, you can set the SCK pin (GPIO14) as output and control its high and low levels in the following ways:

 

const int SCK_PIN = 14; 

void setup() { pinMode(SCK_PIN, OUTPUT); }

void loop() { digitalWrite(SCK_PIN, HIGH);  delay(1000);  digitalWrite(SCK_PIN, LOW);  delay(1000); } 

userHeadPic jenna
2023-05-24 15:03:05

You can use the SPI and I2C pins for general-purpose use. But doing so will prevent you from using them for their original intended communication protocols unless you reconfigure them appropriately in your code.

userHeadPic bidrohini.bidrohini