Giter VIP home page Giter VIP logo

Comments (23)

JiriBilek avatar JiriBilek commented on July 18, 2024 1

I have one Arduino Mega here. I will try and let you know.
Nevertheless, I would recommend you to use level shifter between 5V and 3.3V modules as the ESP8266 is said to be not 5V tolerant.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024 1

We are not talking about VIN but about GPIOs.
The GPIO pin should not be connected to voltage higher than ca 3.6V according to the manufacturer. But if you google the internet for "ESP8266 5V tolerant" you will get many stories about how the MCU survived the higher voltage.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

It's hard to say what's wrong. Obviously, the two modules don't communicate :)

Attach serial monitor to the NodeMCU to see if it works. Connect it via USB to your computer but do not connect power (3V) between the modules, only the ground.
Also you can experiment with debug options and see if there are error messages.

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

I attached serial monitor to the Nodemcu and only I received message "SPI SLAVE ver. 0.2.3 Protocol ver. 0.2.3". Is it correct? or I have to see something else?
I also checked with USB and grand but still not working! :(

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Yes, it is correct.
Let's check the ESP does get a message. Please uncomment both _DEBUG and _DEBUG_MESSAGES in SPICalls.h in ESP project and load it once more.

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

I did it, But nothing show up :|
just previous message that I wrote.
6 month ago I used your library and codes(older version), It seems fine. but now I don't know whats wrong :(

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

That could mean that ESP is not getting any data on SPI. Please double check the connection

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

I already have checked the connection, and in SPI example was fine:

If you have any suggestion I will be grateful.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Did you set debugging on master (arduino)? It is in the file config.h:

// Uncomment the following define if the safe reset circuit (https://github.com/JiriBilek/WiFiSpiESP/issues/6)
// is connected to SS pin on ESP8266. This allows the SS signal to behave exactly
// according SPI specification (goes low before transmission and high after)
//#define ESP8266_SAFE_RESET_IMPLEMENTED

// Allow debugging information to be print on Serial
#define ESPSPI_DEBUG_OPTION

This should write more info on your Arduino.

Edit: At least you should get "Error waitResponse" on Arduino serial monitor.

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

Yes, Now I've got some error :

[espspi_proxy.h:300] W: Slave rx is not ready, status 15
[espspi_proxy.h:300] W: Slave rx is not ready, status 15
[espspi_proxy.h:329] W: Slave tx is not ready, status 15
[espspi_proxy.h:261] W: Bad CRC, request repeated
[espspi_proxy.h:261] W: Bad CRC, request repeated
[espspi_proxy.h:261] W: Bad CRC, request repeated
[espspi_proxy.h:261] W: Bad CRC, request repeated
[wifispi_drv.cpp:262] W: Error waitResponse
WiFi shield not present

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

It really looks like a failure on SPI bus. Do you have a logic analyzer or oscilloscope?

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

No, I haven't.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

We need to see if there are any data on the bus. I suggest you to write a simple sketch on the ESP8266 side that reads the three digital inputs (SS, CLK, MOSI) and writes them to the serial monitor as fast as possible. It would be also fine to slow down the SPI bus by
WiFiSpi.init(-1, 100000); in the Arduino sketch.

from wifispi.

srolf avatar srolf commented on July 18, 2024

@kamalireza Maybe a stupid question, but did you used a level shifter between the mega (5V) and the esp (3.3V) to align the Signal voltage?

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

We need to see if there are any data on the bus. I suggest you to write a simple sketch on the ESP8266 side that reads the three digital inputs (SS, CLK, MOSI) and writes them to the serial monitor as fast as possible. It would be also fine to slow down the SPI bus by
WiFiSpi.init(-1, 100000); in the Arduino sketch.

I did that, I receive some data from it. But still arduino Mega not working!
I did something else. I have changed arduino Mega with Uno. and it's work! but there is some issue I had, I got some error message :

Attempting to connect to SSID: Reza
Connected to wifi
[espspi_proxy.h:329] W: Slave tx is not ready, status 0
[espspi_proxy.h:329] W: Slave tx is not ready, status 0

ssid name is Reza.

Do you have any ideas whats wrong with my arduino Mega?

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

@kamalireza Maybe a stupid question, but did you used a level shifter between the mega (5V) and the esp (3.3V) to align the Signal voltage?

No, I did not use anything for voltage. I connect directly to 3V.

from wifispi.

srolf avatar srolf commented on July 18, 2024

I think it's need. I was testing the implementation in different setups, even with 3.3V M0 and 5V Leonardo.

from wifispi.

kamalireza avatar kamalireza commented on July 18, 2024

I think it's need. I was testing the implementation in different setups, even with 3.3V M0 and 5V Leonardo.

I don't know what is the problem. Please let me know if there is a mistake:
I connect the Vin from Nodemcu to Arduino voltage supplier 5V. Also in datasheet in Nodemcu written Vin voltage must be 5V - 10V.

from wifispi.

aldolo69 avatar aldolo69 commented on July 18, 2024

hi. i'm not able to use this project but the spislave demo in the last esp8266 arduino lib works. i had garbage in the communication from slave to master with all the tests done before the upgrade to the very latest 2.7.1. maybe they have found a solution.

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

Could you please be more specific? Your device, connection (wiring), sketch, serial output on ESP8266?

from wifispi.

aldolo69 avatar aldolo69 commented on July 18, 2024

esp8266 + nano (3.3volt version). nano send and esp receive (many status request in monitor) but the answer is not received and nano report "unable to connect". in many other test done with code found here and there i had the same result. even the master-slave example in the esp8266 core did not work. not sure if i've done anything else other the core upgrade. in any case in hspi_slave.c the SPI1C2 = (0x1<<SPIC2MISODM_S); line is now a little bit different

from wifispi.

JiriBilek avatar JiriBilek commented on July 18, 2024

First of all, I'd double check the wiring. If I understand, you are not able to connect either with this library or with the master-slave example from the core. Be sure to connect grounds between the two modules)

from wifispi.

aldolo69 avatar aldolo69 commented on July 18, 2024

done. it seem ok now. thanks.

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.