How to set up mmwave with xiao esp32s3? - Unable to output Serial

Hi Guys,

I tried to set up by follow the instruction from below.
Current set up, Xiao seeed esp32S3 with mmwave, Radar_MR60FDA1; problem unable to read serial

I have installed the Arduino libraries for XIAO esp32S3, esp32C3 and mmwave, Radar_MR60FDA1.
What did I do to make it work, I have used it on seeed Xiao SAMD21 with mmwave, Radar_MR60FDA1, it works but I need mmwave to work with XIAO esp32S3, not SAMD21.

So far the instructions are mainly for esp32c3 and mmwave:

Problem:
I am facing the same issue as mentioned in FAQ2: Why can’t I see anything in the serial monitor with the XIAO ESP32C3?
I tried following the guide mentioned which is the Special way by use USB serial and UART0/UART1 at the same time. However, this did not work; no output from Serial. Did anyone face the same issue and knows the solution to this problem?

Please check it there is a baud rate mismatch.

#include "Arduino.h"
#include <60ghzfalldetection.h>

//#include <SoftwareSerial.h>
// Choose any two pins that can be used with SoftwareSerial to RX & TX
//#define RX_Pin A2
//#define TX_Pin A3

//SoftwareSerial mySerial = SoftwareSerial(RX_Pin, TX_Pin);

// we'll be using software serial
//FallDetection_60GHz radar = FallDetection_60GHz(&mySerial);

// can also try hardware serial with
//Define two Serial devices mapped to the two internal UARTs
HardwareSerial MySerial(0);
// HardwareSerial MySerial1(1);
FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  MySerial.begin(115200, SERIAL_8N1, -1, -1);

  //  mySerial.begin(115200);
  Serial.println("Readly");
  while(!Serial);   //When the serial port is opened, the program starts to execute.

  Serial.println("Readly");
}

void loop()
{
  // put your main code here, to run repeatedly:
  radar.recvRadarBytes();           //Receive radar data and start processing
  radar.showData();                 //Serial port prints a set of received data frames
  delay(1000);                       //Add time delay to avoid program jam
}

question 1:
I have follow the instruction, baud rate,115200 pins layout are the same as I didn’t change anything as I am using XIAO expansion board,
when using for SAMD21 with mmwave it works but when i swittch to ESP32S3 it didnt work, why?

question 2:
Does the code above works for esp32S3 or only work for esp32C3? I coped code from [60GHz mmWave Fall Detection - 60GHz mmWave Fall Detection Pro | Seeed Studio Wiki - before Demo 7 codes.

I see you are using a soft serial code, what is your wiring like?

Below is the link for the image set up:

Alt text

What is a soft serial code? did i use it correctly? if I don’t know how to do I show it?

Like in in the earlier post, when I used on SAMD21 (seeed Xiao) with mmwave, it is working normally.

Hi there,
Soft Serial is when you use another set of pin defines to choose a second serial port. Yours are commented OUT.
How confident that the TX and RX (Yellow & Green Wires) have you swapped them and tried?
Do you just plug in a samd21 and I works?
Same Expansion board?
HTH
GL :slight_smile: PJ

Yes to both Like stated in 1st post, I already followed all instruction and include all pictures and code.
The code works with samd21 using the same expansion board

from Demo1 Raw data export

Below is the Serial Output using SAMD 21,
Alt text

Below is Serial Output using ESp32S3 Xiao Seeed (not working as stated in the problem)
Alt text

Hit there,
So your not doing it correctly…
“FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);”
I don’t see anywhere where you setup this SERIAL 1 in your initialization.
Go look at the Tutorial, You only have part of it correct.
HTH
GL :slight_smile: PJ

So how do I set up the SERIAL 1 in your initialization?
I have no idea, hence i asked, please advise me. Thanks.

Below are my code, the rest of the top part the rest are same as sample code from Demo 1

HardwareSerial MySerial(0);
// HardwareSerial MySerial1(1);
FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);

Since original code was without HardwareSerial MySerial

original:

FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);

Like I said in Samd21 it works but not working with esp32s3, and in the given guide is only in esp32C3 but not esp32S3.

I will appreciate if you can a full sample code that is working with esp32S3 seeed xiao with expansion + mmwave rather than ask me read the tutorial.
As I have been reading multiple times, and I tried to screenshot everything despite i already did all you have asked.

Below is Demo 1 export data - please let me know which part to add or edit to make it work with esp32S3 + expansion board + fall detector 60g pro mmwave. Thank you

#include "Arduino.h"
#include <60ghzfalldetection.h>

//#include <SoftwareSerial.h>
// Choose any two pins that can be used with SoftwareSerial to RX & TX
//#define RX_Pin A2
//#define TX_Pin A3

//SoftwareSerial mySerial = SoftwareSerial(RX_Pin, TX_Pin);

// we'll be using software serial
//FallDetection_60GHz radar = FallDetection_60GHz(&mySerial);

// can also try hardware serial with
FallDetection_60GHz radar = FallDetection_60GHz(&Serial1);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial1.begin(115200);

  //  mySerial.begin(115200);

  while(!Serial);   //When the serial port is opened, the program starts to execute.

  Serial.println("Readly");
}

void loop()
{
  // put your main code here, to run repeatedly:
  radar.recvRadarBytes();           //Receive radar data and start processing
  radar.showData();                 //Serial port prints a set of received data frames
  delay(200);                       //Add time delay to avoid program jam
}

Hi there,
I don’t have a spoon :laughing:
But start with ,Google and search Arduino Soft Serial and look those over, AND/OR uncomment the code you have here and change the pins to The RX and TX pins on the Expansion, D7 & D6. Also I doubt the Radar comes set at default rate of 115200 but may be wrong. Check that.
:index_pointing_at_the_viewer: should add some print statements after initializing and it helps check you work.
You said the hardware is the same , you are only unplugging one chip and replacing it with the other.
what about the (SWD PINS) underneath the DEV board. ARE they just touching all the stuff under there?(esp vs nrf with Expansion board info/differences) Probably not good?
HTH
GL :slight_smile: PJ
I think it’s the PINS touching underneath messing things up ? LMK

If you use some "if defines" you could use the same code for both MCU's and when you compile it will know by the BSP you select. 
ie. IF Defined "esp32c3"
 set softserial stuff
 do ESP32C3 stuff
Else IF Defined "ESP32S3"
use the Hardware Serial1 ;serial 1 port 
do ESP32S3 stuff
 set PSRAM etc..
END IF.
the rest of the code.
end if