Second I2C on WEMOS D1 MINI - help!

Hello there!

First time i am posting here. I need some feasibility help with a project.

I am using a WEMOS D1 MINI, where i have succesfully connected:

SDL SCA oled screen at pins D5-D6 using Wire.begin(D6, D5);
RS482 module at pins D1-D2 using SoftwareSerial, SoftwareSerial RS485Serial(D1, D2);
Potentiometer at A0
and i also use onboard WiFi connection

My question is, can i somehow also connect a SDCARD reader module like the Adafruit MicroSD card breakout board+ that uses 4 pins MISO-MOSI? As far as i understand its I2C as well like the oled screen, but i don't know much about them.

Should i try same pins and second channel or can i somehow create a second miso mosi port and connect to it?

I have free pins D3-D4-D7-D8

Any help appreciated!!

Your OLED interface is indeed I2C (using SCL and SDA), but the SDcard is SPI (using SCLK, MISO, MOSI and CS).

WeMos Mini D1 - Default I2C & SPI pins

1 Like

thank you that was eye opening.

so do you think i can use the remaining pins? maybe wire 3-4 for i2c and the default ones (5-6-7-8) for the sdcard SPI?

EDIT or maybe even better, change to the default I2C as well (1-2) and use softwareserial on 3-4...

My goto "which pins are safe to use on the ESP8266" resource is Random Nerd Tutorial's ESP8266 Pinout Reference, specifically the "Best Pins to Use - ESP8266" section.

2 Likes

Why do you want to add an SD card reader? How large are the files?

You can use up to 3MB of the flash memory of the Wemos d1 Mini to store files.

i need the customer to be able to change wifi ssid and password, and an easy way is to have him change it on the sd card

Have you considered WiFi Manager library?

Include that in your code and if the Wemos cannot connect to an access point, it opens a hot spot enabling your customer to connect and then enter the access point credentials onto a web page.

2 Likes

this is very interesting thank you... will test soon.

thank you for this. really upgraded my project without the addition of an sd card!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.