I have an UNO and esp8266 NodeMCU 12E(eventually two UNOs) and would simply like one to signal the other when a certain condition is met, wirelessly. I'd like to do this in the simplest way possible, perhaps sending a high 1 bit for a short time interval. The distance between the two will range from a few feet to about 100m. I hastily ordered two of these RF1100SE modules that use the CC1101 chip and have pins SCK,MOSI,MISO,GD02,CSN, and GD00. I have one connected through a level shifter to the UNO and the other to the NodeMCU Unfortunately, I have no idea how to use them, and the research has pointed me in a hundred different directions, most of them too complicated for my purposes (and my brain).
I was wondering what is the best/easiest way to do this. Just to preface, I know nothing about SPI or serial communication and am new to Arduino. So, is there a way to do this without using SPI (I don't need complicated two way communication)? Can I use the SoftwareSerial library somehow, and if so, what pins would be used? Any help would be greatly appreciated.
Robin2:
I find this confusing. If you have an Arduino with an ESP8266 which is a perfectly good wireless module why have you bought other wireless modules?
A diagram showing the proposed communication arrangements might help.
...R
The ESP is a wifi module right? I will not be connecting to the internet with this, which is why I chose RF as the communication method. The ESP is there just for testing as I don't have my other UNO yet. I would post a diagram but it really is just one RF module connected to the UNO and another to the ESP8266. I'm looking for advice on my approach to this, maybe a library these modules use, or if I can use SoftwareSerial. I don't need to do anything complicated like data loss prevention, just want to send over a high bit.
Robin2:
You can easily use a pair of ESP8266s for communication without WiFi. See this ESP-NOW tutorial.
Of course you can also use a pair of 433MHz wireless modules for communication but the code will be different and I have not used them myself.
However an ESP8266 uses 2.4GHz wireless and cannot communicate with a 433MHz device.
...R
OK so I just briefly checked out your ESP-NOW tutorial. I have a few questions, forgive my ignorance as I am really new to all this. Are you saying two ESP8266s (NodeMCU in my case) can accomplish the same thing as two nRF24s? They don't need to be connected to a router or the internet somehow? And if I did this in a corporate environment (as this project requires), can it interfere with the local network?
This might be the best route to go, thanks for your response.
I don't have a NodeMCU but I presume it behaves the same as the simple ESP8266 module and if so then it should work as in my tutorial. It would probably take you no more than 15 minutes to do a test.
In ESP-NOW mode it is not using WiFi but it is using 2.4GHz wireless - but so is an nRF24. If there is interference you could experiment with different channels (frequencies within the 2.4GHz band).
Is there a library for espnow? I'm looking all over and can't seem to find one. I see you use include espnow.h so I would assume so. My two esp-12s came in and i'd like to try testing them.
RedBlu92:
Is there a library for espnow? I'm looking all over and can't seem to find one. I see you use include espnow.h so I would assume so. My two esp-12s came in and i'd like to try testing them.
Thanks.
It is just a standard part of the ESP8266 programming system. If you have added to the IDE the capability to program ESP8266 devices you will have the ability to use ESP-NOW
I got it working! I was confusing a compiler error for needing a library(running OS X). I needed to do this in order for it to compile,
Quit Arduino IDE
go to ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.1.0/platform.txt
Search "compiler.c.elf.libs", and append "-lespnow" at the end of the line.
Just wondering something, if this protocol is connectionless, does this mean that nothing is being transmitted even though the devices are "paired"? Having a hard time understanding how it works.
I am more familiar with the nRF24L01+ transceivers and if ESP-NOW works the same way (I think it does) then they are not paired. There is no connection until a message is actually sent. The ID of the recipient is part of the data that is sent - just like posting a birthday card with the address on the envelope.