0

Problem: SPI Connection between two D1 (ESP8266) boards does not work properly, only master to slave transfers data correctly.

What I did: I connected two Wemos D1 R2 via SPI and installed the library from https://github.com/esp8266/Arduino. I connected MISO, MOSI, SCK, SS and ground 1:1. On one D1 I run SPISlaveTest on the other SPIMaster from the examples. The D1 are located directly beside each other, cables are only 15 cm long.

Effect: While the slave receives strings from the master fine the master seems to get crippeled answers from the slave, they appear as ??? and other characters. If I connect the slaves SS to +3.3V it reacts like expected: The slave receives no more, the master gets no reponses.

What I already tried:

  • Updated the Libraries to the latest versions
  • Changed delay to wait for answer
  • tried SafeMaster.ino
  • Changed D1 hardware on both sides

Everything unfortunately did not help.

Any tip is very appreciated.

Thanks!

  • try swapping the master and slave devices – jsotola May 21 '18 at 22:20
  • install esp8266 arduino core in IDE board manager and the spislave library is part of that package. you do not need GitHub for that – Juraj May 22 '18 at 4:38
  • did you connect ground between D1 R2s? – Juraj May 22 '18 at 4:39
  • I connected ground and also opened this connection as they are both connected to the same computer via usb no difference. And yes, I installed the library through the board manager. Also I swapped devices because I have several D1. – MichaSchumann May 22 '18 at 5:57
  • If the corruption is unidirectional is there an issue with your MISO line? – Code Gorilla May 23 '18 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.