Notifications
Clear all

seeeduino xiao

17 Posts
7 Users
5 Likes
2,391 Views
(@jpj1623)
Member
Joined: 3 years ago
Posts: 3
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)
Member
Joined: 5 years ago
Posts: 2042
 

   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
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)
Member
Joined: 3 years ago
Posts: 3
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: 5 years ago
Posts: 1037
 

@jpj1623

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

SteveG


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@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 reacted
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

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.


   
activ8me reacted
ReplyQuote
(@lydara)
Member
Joined: 3 years ago
Posts: 90
 

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


   
activ8me and MadMisha reacted
ReplyQuote
(@jpj1623)
Member
Joined: 3 years ago
Posts: 3
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
(@alexieee)
Member
Joined: 3 years ago
Posts: 4
 

Hello jpj1623:

I am trying to use the GBT24LTR11 Doppler radar sensor from Seeed, but I’m having a compile error. I already downloaded the GitHub library but I still can not get the code to compile. Can you please tell me what you did to get the code to compile?  Thank you!


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@alexieee 

What error message(s) are you getting from the compiler ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@alexieee)
Member
Joined: 3 years ago
Posts: 4
 

@will I don’t have my computer with me, but one of the errors is ‘comSerial’ not declared in this scope. 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@alexieee 

Capitalization matters in the C language and the above examples define COMSerial, so you should check your spelling to make sure it matches exactly.

I have not used this device, so I can't comment on operation - just compilation.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@alexieee)
Member
Joined: 3 years ago
Posts: 4
 

@will My bad, The problem is not a typo since I copied the code directly from the manufacturer’s website. I will post the exact errors when I get access to my computer. Hopefully you can point me in the right direction. 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@alexieee 

Ok then, talk to you later.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Page 1 / 2