The problem I'm having is that I get an error message "Fatal error: RadarSensor.h: No such file or directory #include <RadarSensor.h>" when I Verify the code. I downloaded the RD03D.zip per the instructions in both the video and guide. But even when I opened the Zip file and saved the contents (RadarSensor.h and RadarSensor.cpp) to a different folder, the Arduino web page couldn't find it the RadarSensor file.
I think the directions are geared toward the IDE software that people download to their PCs's. But I'm using the Arduino website. As shown in the screenshot below, I went to the Libraries page and downladed the Radar. h library since the description seemed to be what I was looking for. But the Verify process still comes up with an error when it comes to the "RadarSensor.h" line of code.
I wasn't able to download either of the two files: RadarSensor.cpp & RadarSensor.h. The computer displays the message "0% downloaded" and never changes.
First I tried to download the individual files to the main Sketches directory. That didn't work. Then I discovered I could go into the sketch itself and add the individual files. I think this is what @J-M-L and you are referring to.
I entered #include "RadarSensor.h" like @J-M-L recommended and that worked. Yay!
I am trying the same code / library but it’s not working, I don’t have any compilation errors but the radar.update is failing. The only thing I changed was the RX/TX pin numbers. I also only connected the Tx from RD-03D to RX of the Nano.
Think I understand, so it looks like trying to get data from the Rd-03d and output it to PC using “serial monitor” in the arduino IDE whilst using a nano isn’t possible? is your suggestion get an Uno?
OK, I have changed the code and attached the RD-03D TX pin to D2 of the nano and still not getting anything, BTW Isn’t 256000 the default comms speed the the RD-03D outputs? I did try lowered it to 115200 and I still didn’t get anything.
I always shake my head in wonder when library writers do things like that. Much better to have the constructor accept a Stream class object (C++ reference or pointer) that's set up in the user code. That way it could be used with SoftwareSerial or a hardware UART. That's especially useful for processors with multiple hardware UARTs.
agreed - esp. when the default baud rate for this sensor is 256000 bps...
SoftwareSerial will choke on that speed, all the more if Serial printing is also happening at the same time...
both pins needs to be attached probably and you need GND too. Also looking at the doc, it seems to be a 3.3V sensor. Connecting it directly to a Nano's pin is not a great idea...
In the video about this (the one I was following) it did say do not connecting both pins as you rightly point out it’s 3.3v and in the video he does says not to connect (Arudino Tx - RD-03D RX) and I haven’t, however I should (in my mind be able to receive data on Arduino Rx. I have checked the RD-03D Tx and there is data on that line, it’s not showing it on the Arduino.