Using D1 and D2 for SCL and SDA, & variations of the ESP8266
Posted: Sun Jan 22, 2023 3:08 pm
I have an abundant supply of Robotdyn ESP8266-Pro modules I use for applications with I2C LCD displays.
On a LittleFS.h discussion page this morning, using a NodeMCU ESP8266 module, I noticed the author is using port D1 as SCL and D2 as SDA for his LCD display. Here https://www.hackster.io/Neutrino-1/littlefs-read-write-delete-using-esp8266-and-arduino-ide-867180
The NodeMCU pictured has the same labeled ports (D0, D1, D2, D3) as does the ESP8266-Pro module.
Could I also use the ports D1 as SCL and D2 as SDA on the ESP8266-Pro module?
And not declare which ports are to be used for the SCL and SDA?
Looks like the author's code doesn't contain a
statement.
On a LittleFS.h discussion page this morning, using a NodeMCU ESP8266 module, I noticed the author is using port D1 as SCL and D2 as SDA for his LCD display. Here https://www.hackster.io/Neutrino-1/littlefs-read-write-delete-using-esp8266-and-arduino-ide-867180
The NodeMCU pictured has the same labeled ports (D0, D1, D2, D3) as does the ESP8266-Pro module.
Could I also use the ports D1 as SCL and D2 as SDA on the ESP8266-Pro module?
And not declare which ports are to be used for the SCL and SDA?
Looks like the author's code doesn't contain a
Code: Select all
to declare which ports are used for SCL and SDA. only the lcd.begin(SDAport, SCLport);
Code: Select all
lcd.init();
statement.