Giter VIP home page Giter VIP logo

Comments (12)

ristomatti avatar ristomatti commented on July 18, 2024

I guess it's worth mentioning I've used the logic level converter just recently for serial communication between the devices so I would doubt it to be the problem.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Hi,
are you sure you have proper wiring between Mega and ESP? The Mega SPI pins are not the same as for UNO.
See https://www.arduino.cc/en/Reference/SPI

My testing setup is NodeMCU and Pro Mini running on 5V. To convert voltage between them I use the same converter as you.

Edit: I checked the converter and I use another one. But it does not matter.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Posting a picture of my testing device. It was taken by my mobile phone so the quality is not very high.

dsc_0539

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

And one more thought: have you connected grounds between Arduino, converter and Wemos?

from wifispi.

tonton81 avatar tonton81 commented on July 18, 2024

be sure you use the github version of esp8266 for arduino as theres alot of features, fixes included in it thats not in the stock arduino release. it may ressolve the SPI slave issues your having

I was interested in the spi version but due to the bugs in the stock IDE it threw me to write UART version on both ends of the link, with 2 way acknowledgements, and 2-way control (multi-master mcu controller)

this gives complete uart control, i2c, spi control, gpio, analog, and user handler payload transfers all remotely, a type of setup that would make mesh networks cry, as the class objects can dynamically change winsocket ip depending on what you want to control. i plan to add more upgrades though
here is a demo of the project im working on, where 2 teensies at both ends of the link *attached to esp8266's) are controlling each other's led:
https://www.youtube.com/watch?v=RuPVjO1DDnY

but without the GIT version of esp8266, you'll have problems with both winsockets and SPI slave support

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

I didn't know about versions of esp8266 software for arduino. I am using the one from http://arduino.esp8266.com/stable/package_esp8266com_index.json

from wifispi.

tonton81 avatar tonton81 commented on July 18, 2024

if thats for your boards manager its not the core
one sec, here:
https://github.com/esp8266/Arduino/blob/master/README.md#using-git-version

the speed of the esp8266 also performs faster websockets connection/traffic than the one that ships with arduino IDE. keep in mind, the GIT has all updates and fixes that havnt been pushed into the IDE updates for quite a long time, uses latest lwip2 while the IDE is still on lwip1...

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

I see. I am generally not in favor to use nightly builds and I like to stick to stable versions (especially when my software works fine). But it is worth to try the github version.
Thanks for the information.

from wifispi.

ristomatti avatar ristomatti commented on July 18, 2024

@JiriBilek I have used separate SPI pins for Mega and the grounds were connected. I will check the wirings again just to be sure and post photos.

@tonton81 I read about the SPI slave issues when trying to debug this. I'll see if I'll try the GitHub version if I manage to get it running on PlatformIO. At least I was able to use the staging version of Arduino for ESP32.

Thank you both for replying!

from wifispi.

ristomatti avatar ristomatti commented on July 18, 2024

Let me know if the connections are difficult to see. It was surprisingly difficult to take a photo where you could clearly see all the connections.

image

I started thinking if the NodeMCU pin numbers are different than the ones on the Wemos D1 Mini. Here are the GPIO mappings from pins_arduino.h:

static const uint8_t D5   = 14;
static const uint8_t D6   = 12;
static const uint8_t D7   = 13;
static const uint8_t D8   = 15;

from wifispi.

ristomatti avatar ristomatti commented on July 18, 2024

Problem solved. I checked the connections the fifth time only to realize the level shifter has the 3.3V and 5V reversed! 😒.

I'm sorry for wasting your time! The issue can be closed. Awesome I'll get to properly test the library!

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Oh, thanks for info. I am glad you found it.
Closing the issue.

from wifispi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.