Comments (23)
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.
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.
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.
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.
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.
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.
That could mean that ESP is not getting any data on SPI. Please double check the connection
from wifispi.
I already have checked the connection, and in SPI example was fine:
If you have any suggestion I will be grateful.
from wifispi.
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.
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.
It really looks like a failure on SPI bus. Do you have a logic analyzer or oscilloscope?
from wifispi.
No, I haven't.
from wifispi.
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.
@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.
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 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.
I think it's need. I was testing the implementation in different setups, even with 3.3V M0 and 5V Leonardo.
from wifispi.
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.
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.
Could you please be more specific? Your device, connection (wiring), sketch, serial output on ESP8266?
from wifispi.
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.
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.
done. it seem ok now. thanks.
from wifispi.
Related Issues (20)
- Using library with Arduino Zero clone. HOT 2
- Example wifiManager HOT 1
- Problem with 3 second delay when calling WiFiSpiServer::avaliable() HOT 28
- Allow more than one connection in WiFiSPIServer HOT 3
- Protocol version mismatch. Please upgrade the firmware HOT 2
- Possible to run this on Arduino Due? HOT 10
- Add .remoteIP() function to WiFiSpiClient HOT 1
- How to manage maximum socket connections? HOT 16
- Compiler warning when "delete"ing a client instance HOT 31
- ESP8266: change AxTLS to BearSSL HOT 1
- Deprecated boolean type HOT 1
- Problems using ArduinoMDNS with WiFiSpi HOT 13
- Possible to set MAC address of ESP? HOT 1
- Reason for limitation of 4 sockets? HOT 1
- Protocol version mismatch. Please upgrade the firmware HOT 8
- Connect fail using BearSSL branch HOT 26
- Version mismatch HOT 2
- WiFiSpi.config(...) problems with number of parameters HOT 6
- Unstable HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifispi.