Connect an Adafruit Feather (nRF52 Bluefruit LE - nRF52832) to an ESP8266-01 through serial connection

Hi,
My team and I were trying to connect an Adafruit Feather (nRF52 Bluefruit LE - nRF52832) to
an ESP8266-01 through serial connection.
The process is the following:

  1. A bunch of sensors send data to the Adafruit Feather.
  2. The Feather sends all the data via serial communication to the ESP8266-01.
  3. Then the ESP sends all to a server.
    We are having problems in the communication between the Feather and the ESP. For several
    weeks we tried to code for ourselves and then after lots of failures, we advance for pre-done
    codes found on forums, but no one was working, at least with our hardware.
    Did someone had the same problem? If yes, how did you solved it?
    Best regards,
    Paulo Andrade

See this post for a complete set of code and circuit for Uno-ESP8266 connection.
The circuit will also work for 3v3 to 3v3.

Here is a circuit and two sketches for Adafruit nRF52 and ESP8266.
Needs SafeString V4.1.2 (will turn up on the the Arduino manager in a day or so)
can be downloaded now from the SafeString tutorial
HardwareSerialCSVToESP8266.ino (2.0 KB)
ESP8266CSV_fromFeathernRF25.ino (2.6 KB)
The nRF52 sketch use the USB serial, because software serial does not work well with BLE.
This default SerialComs sets up a 60byte tx/rx buffer. Can be easily increased for the buffer from Adafruit to ESP. Post back here if you need to send more then 60 chars at a time.

Here is the circuit (note the TX/RX connections)
SerialComs_ESP8266_AdafruitFeather_nRF52.pdf (40.9 KB)

We have this bit of code that receives data from the serial monitor of the pc, then the ESP8266-01 receives it and prints it again. We wanted that the ESP8266-01 receive data from an Adafruit Feather via serial communication (TX-RX) and then print that in the serial monitor.
My code is the following:

/*
ESP8266 Serial Communication

The blue LED on the ESP-12 module is connected to GPIO2
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
*/

void setup() {
Serial.begin(9600); // Initialize the Serial interface with baud rate of 9600
}

// the loop function runs over and over again forever
void loop() {
if(Serial.available()>0) //Checks is there any data in buffer
{
// Serial.print("We got:");
Serial.print(char(Serial.read())); //Read serial data byte and send back to serial monitor
}

}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.