Notifications
Clear all

seeeduino xiao  


jpj1623
(@jpj1623)
New Member
Joined: 1 month ago
Posts: 4
Topic starter  

I have bought the xiao expansion board to run a module for doppler radar 'GBT24LTR11' and the program code from the site to run on the arduino ide and I also tried it on the platformio as well.  No go got compiler errors.  Here is a sample of the code

 

#include "GBT24LTR11.h"

#ifdef __AVR__
#include <SoftwareSerial.h>
SoftwareSerial SSerial(2, 3); // RX, TX
#define COMSerial SSerial
#define ShowSerial Serial

GBT24LTR11<SoftwareSerial> GBT;
#endif

#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define COMSerial Serial
#define ShowSerial SerialUSB

GBT24LTR11<Uart> GBT;
#endif

#ifdef ARDUINO_ARCH_STM32F4
#define COMSerial Serial
#define ShowSerial SerialUSB

GBT24LTR11<HardwareSerial> GBT;
#endif

void setup() {
// put your setup code here, to run once:
ShowSerial.begin(9600);
COMSerial.begin(115200);
GBT.init(COMSerial);
while (!ShowSerial);
while (!COMSerial);
/*
MODE 0 -->detection target mode
MODE 1 -->I/Q ADC mode
*/
GBT.setMode(0);
//Set the speed detection range
while (!GBT.setSpeedScope(512, 0));
}

void loop() {
// put your main code here, to run repeatedly:
uint16_t maxspeed, minspeed;

//View speed range
if (GBT.getSpeedScope(&maxspeed, &minspeed)) {
ShowSerial.print("maximum speed: ");
ShowSerial.print(maxspeed);
ShowSerial.print(" Minimum Speed: ");
ShowSerial.println(minspeed);
}
delay(1000);

}

 

but the compiler says=

In file included from C:\Users\jpj16\Downloads\Seeed_Arduino_DopplerRadar\examples\BGT24LTR11_TARGET_SPEED_SCOPE\BGT24LTR11_TARGET_SPEED_SCOPE.ino:1:0:

C:\Users\jpj16\Downloads\Seeed_Arduino_DopplerRadar\examples\BGT24LTR11_TARGET_SPEED_SCOPE\GBT24LTR11.h:39:10: note: candidate: void GBT24LTR11<T>::init(T&) [with T = Uart]

void init(T& serialPort);

^~~~

C:\Users\jpj16\Downloads\Seeed_Arduino_DopplerRadar\examples\BGT24LTR11_TARGET_SPEED_SCOPE\GBT24LTR11.h:39:10: note: no known conversion for argument 1 from 'Serial_' to 'Uart&'

exit status 1

no matching function for call to 'GBT24LTR11<Uart>::init(Serial_&)'

I have approached seeedstudio about the issue but if anybody can help me out by suggesting possibly a solution to be able to compile. Thank you.  If this is the wrong area for posting please forgive me. 


Quote
robotBuilder
(@robotbuilder)
Prominent Member
Joined: 2 years ago
Posts: 812
 

@jpj1623

So much nicer, and sort of important in long listings, to retain indentations.

See Forum Help Menu on Forum's main page.

 

#include "GBT24LTR11.h"

#ifdef __AVR__
#include <SoftwareSerial.h>
SoftwareSerial SSerial(2, 3); // RX, TX
#define COMSerial SSerial
#define ShowSerial Serial

GBT24LTR11<SoftwareSerial> GBT;
#endif

#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define COMSerial Serial
#define ShowSerial SerialUSB

GBT24LTR11<Uart> GBT;
#endif

#ifdef ARDUINO_ARCH_STM32F4
#define COMSerial Serial
#define ShowSerial SerialUSB

GBT24LTR11<HardwareSerial> GBT;
#endif

void setup() {
  // put your setup code here, to run once:
  ShowSerial.begin(9600);
  COMSerial.begin(115200);
  GBT.init(COMSerial);
  while (!ShowSerial);
  while (!COMSerial);
  /*
  MODE 0 -->detection target mode
  MODE 1 -->I/Q ADC mode
  */
  GBT.setMode(0);
  //Set the speed detection range
  while (!GBT.setSpeedScope(512, 0));
}

void loop() {
  // put your main code here, to run repeatedly:
  uint16_t maxspeed, minspeed;

  //View speed range
  if (GBT.getSpeedScope(&maxspeed, &minspeed)) {
    ShowSerial.print("maximum speed: ");
    ShowSerial.print(maxspeed);
    ShowSerial.print(" Minimum Speed: ");
    ShowSerial.println(minspeed);
  }
  delay(1000);

}

 

 

 


ReplyQuote
MadMisha
(@madmisha)
Estimable Member
Joined: 1 year ago
Posts: 240
 
Posted by: @jpj1623

#include "GBT24LTR11.h"

What library is this? It didn't come up in a search in the library manager. If you provide a link to a git it might help.


ReplyQuote
jpj1623
(@jpj1623)
New Member
Joined: 1 month ago
Posts: 4
Topic starter  

If you go to the site of seeedstudio.com and enter GBT24LTR11 it will show you the module and what it cost.  It also has the demo code you can download and in their is the very file you are missing. I added it to the sketch area where it was kept and it used it from their.  In my previous post I mentioned that had compiled again after adding the library to the sketch file but it found another error that I don't fully understand, so if anybody can offer insite to the error so I can have a straight compile through.  Thank you all for your help.


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1050
 

@jpj1623

The module is BGT24LTR11.  Not GBT.  Or just search for doppler radar.

SteveG


ReplyQuote
MadMisha
(@madmisha)
Estimable Member
Joined: 1 year ago
Posts: 240
 

@jpj1623

Try replacing this:

 

#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
   #define COMSerial Serial1
   #define ShowSerial SerialUSB

   GBT24LTR11<Uart> GBT;
#endif

 

UART should be on serial1 on the XIAO(Yes, their example sketch is incorrect). I did get it to compile.


LydaRA liked
ReplyQuote
MadMisha
(@madmisha)
Estimable Member
Joined: 1 year ago
Posts: 240
 

Oddly enough, I think I found the github Seeed-Studio Seeed_Arduino_DopplerRadar and it appears to be correct there but they don't mention using UART on SAMD in their readme. I guess they don't update their website very much. I already have a distrust of Seeed Studios, this does not help.


ReplyQuote
LydaRA
(@lydara)
Trusted Member
Joined: 2 months ago
Posts: 95
 

@madmisha Well given the "Seeed" [sic] guys cannot spell their own name correctly...  ;-p


MadMisha liked
ReplyQuote
jpj1623
(@jpj1623)
New Member
Joined: 1 month ago
Posts: 4
Topic starter  

Thank you for your help in getting this to compile. I wanted to use it to detect cars and give the the speed of it but I guess it is not designed for this. Again thank you for your help.

 


ReplyQuote