YTread Logo
YTread Logo

Getting Started with LIDAR

Feb 27, 2020
today in the workshop we will work with

lidar

, we will see to illuminate our devices the TF mini, which is an inexpensive

lidar

unit that you can use to avoid collisions, and the RP lidar, a lighter device capable of performing a full 360 degree turn . sweep there's a lot to scan today so welcome to the workshop hello and welcome to today's workshop we're going to be working with some really cutting edge technology and before we start I want to tell you a little story behind it about two months ago, in response to one of my other videos, I got a comment from one of you asking if I could make a video about using lidar and I responded to the comment and said I would love to work with lidar because I think it's a really interesting technology, the only problem is that the devices Commonly available lidar and sensors were too expensive to use here in the shop.
getting started with lidar
I tend to try to use components that are inexpensive because I want you to be able to reproduce the things that I make like Well, and if I start working with two three hundred dollar components, no one will be able to afford to do it right. After having this discussion, I had another discussion with the good people at DF Robot and they pointed out to me that they have a couple of lidar devices that are not expensive at all and in fact they have been kind enough to send me not one but two of these devices and I am very excited to be able to show you these two devices today, now one of these devices is a stationary lidar device and it costs a whopping $40 which is really remarkable.
getting started with lidar

More Interesting Facts About,

getting started with lidar...

The other device is a full 360 degree rotating lidar similar to the type of lidar you've seen on top of autonomous vehicles and this goes for a cool $100 so this really brings the cost of the lidar down to the point where we can start using it in our robotics experiments. Now lidar may seem like a very new technology and that is because we see it in self-driving cars and that is a very new technology option, but a true fact, lidar has been with us for a long time, more than 50 years, Lidar was actually developed shortly after the laser was developed and was pretty much limited to government and military experiments.
getting started with lidar
The most famous use of lidar in the early days. It was during the Apollo 15 lunar mission in the 1970s that they actually used lidar to make a topographic map of a section of the moon, today of course we think of lidar being used as one of the navigation systems in our cars autonomous and that's why we would do it. I love being able to use this technology inside our robots and with these inexpensive devices we can now do it, so the way this episode will work is as follows. I'm going to do the usual thing, show you how lidar works and explain why you would use lidar in certain situations and show you some experiments with the 2df robotic devices that were provided to me for this video, but before I do any of that I want to show you these two devices, like this Let's take a look. them right now, so here are the two devices that the DF robot was kind enough to send us for our lidar experiments.
getting started with lidar
The first one here is called TF mini lidar sensor. I'll show you that the first one now here is the sensor itself, as you can. See, it has a source and a receiver with a pair of lenses and a bunch of circuitry and a little connector to connect it to the outside world. Now, in order to use that connector, they were kind enough to supply not one but two cables. Now this cable has the little mini connector on one end for the lidar and another connector that you can put on a printed circuit board to connect a device.
This connector has the mini-jack on one end and the other end. I have four of these female DuPont connectors and that's really perfect for doing breadboard experiments so that's the TF mini lidar, let's put that aside now, this is the rpi lidar and this is an absolutely amazing little device and It's really well packaged. I will have to say that we are going to open it up so we can show you that it comes with a little package on the top here, first a little package, you get a cable and a little note on how to connect the lidar to a PC using an adapter that is included in the box here now, as you can see, it's very well packaged.
They sent it to me from China and it arrived in perfect condition. No wonder given this excellent packaging. This is a small adapter device that can be used. To connect the lidar directly to a computer, you have a connector on one end for this cable and on the other end you have a micro USB connector to connect to your computer and this is the device itself. Now take a look at this. This is a real little beauty. This is a full scan LIDAR unit. You can see the transmitter and receiver here and it is on a scanning platform with a motor.
It's a completely self-contained unit, it has a processor and everything in it has this cable here to connect it to. to the USB adapter and there you have it, a beautiful little device of incredible quality and value, so let's take a look at what we can do with these devices now. So what exactly is lidar? Well, the original meaning of lidar was light detection and ranging. was based on the acronym for radar, which is radio detection and ranging, nowadays lidar can also mean light imaging detection and ranging, which is a more accurate description of what it does. lidar uses a focused beam of light and a sensor to detect the range and The reflectivity of a lighter of remote objects is used in surveying applications to create high-resolution maps and, of course, is used in autonomous vehicles and in robotics, which is the interest we have in lidar.
Basically lidar works by sending a focused beam of light to a remote object the beam is reflected back to the lidar sensor the distance a remote object travels is determined by the travel time of the beam which of course travels at the speed of The light reflectivity of the object is determined by the intensity of the beam in surveillance applications Lidar is often carried on an aircraft that emits rays to illuminate our light rays towards the earth which are reflected back to the aircraft. Here is a computer animation provided by NASA of a lidar scan of the Amazon rainforest.
Now, in autonomous vehicles, lidar is used as one of the main sensors. It is used along with an orientation sensor that determines where the vehicle actually is at that moment, as well as a very high-powered computer and software to correlate everything. information. In fact, autonomous vehicles use several lidar sensors as well as a radar camera and other sensors to determine their position and the position of objects around them. Here is an example of the type of data that lidar scanning in an autonomous vehicle would use to determine its position and position. of elements around you, so now let's start with lidar, so let's compare the TF mini lidar sensor with a couple of other methods for detecting distance and proximity.
Now I have two other devices besides the TF, many are here to show you this one. I am sure you are familiar with this HC SR 0 for ultrasonic sensor and it has a source and a receiver that sends ultrasonic signals to measure distance. Now we did an article and a video about the HC SR 0 for the HC SR 0 has a minimum range of around 2 centimeters and a maximum range of about 4 meters and it has an accuracy of about half a centimeter within that range, so it's pretty good at detecting objects at the distance you normally find in robotics, it now uses ultrasonic sound and doesn't work very well outdoors, it works much better indoors, can be interfered with by other sound sources and some objects tend to absorb the sound rather than reflecting it, so this is good for sure. objects, but in other applications it is not so good now, this is an optical source sensor arrangement that is actually used as a proximity detector and it has a small potentiometer here, a small potentiometer.
Now the way this device works is that it sends out a beam of infrared light and looks for the reflected beam coming back, but instead of using it to measure distance, it just sends it out as a trigger, so the output pin of here will increase when an object is detected within the detection distance. You set the detection distance. When using this potentiometer, this is not very good at all for measuring distances, but it is great for knowing if there is a device immediately in front of you. It only has a range of about a meter at most, but what would I use?
On a robot, you would strategically place some of these on the robot and use this pulse here to bypass an interrupt on your Arduino or Raspberry Pi or other controller so that if the robot got close to something this would go up and you would get an alert and then you could take the appropriate action such as stopping or moving the robot and here of course we have the TF mini lidar sensor, now it has a minimum range of about thirty centimeters so it's not very good for anything closer than that, without However, it has a maximum range of approximately 12 meters and that is a really long distance, so it will cover any situation we have indoors and many outdoor situations.
It's also much better for working outdoors than a A device like this would now of course be much more expensive than both of these devices, so it's really a trade-off between performance and capabilities and many designs would use all three devices. , but I just wanted to show you what the difference is. It is one of the different types of proximity sensors that you can use in robotics, the TF mini lidar is a low cost stationary lidar device instead of using a laser beam, it uses a focused infrared LED and this keeps the cost of the device down.
The TF mini's range measures from 30 centimeters to 12 meters, which is approximately 1 to 40 feet. The device has its own internal processor and communicates with external devices through a serial input/output port. It has a maximum sampling rate of one hundred Hertz, in other words. it can take one hundred readings per second and those readings will be accurate to within five millimeters or half a centimeter over their entire range the TF mini has a four pin connector here is the pin of the TF mini now let's look at those pins in detail GND is obviously the VCC ground pin is the supply voltage.
The device requires four point five to six volts to operate, so it will work well on a five volt power source. Txd is for transmitting data line. Please note that this is a 3.3 volt logic line and not a 5 volt logic line rxd is the received data line, it is also a 3.3 volt logic line. Now let's take a look at how we use the TF mini lidar now, as you just saw the TF mini makes use of 3.3 volt logic levels instead of the 5 volt logic that most of us are used to working with. . Now we've worked with 3.3 volt logic before, if you remember when we did the motion sensor video and the article, it's a 3.3 volt device and we powered it. directly to a 5 volt Arduino without any problems, so this is how 3.3 volt logic works: when you have a 3.3 volt output, you can safely put it into a 5 volt input, obviously not it will exceed the voltage which can only reach 3.3 volts but it will also work correctly and the reason for this is that TTL logic which is what we call 5 volt logic, TTL stands for transistor and transistor logic. 5 volt logic actually has a threshold of 2.8 volts, in other words any signal over 2.8 volts will be considered digital, anything less than 2.8 volts will be considered a digital zero, so, Since 3.3 volt logic satisfies that requirement, you can safely power the transmit output of the TF many to an input on your Arduino without any problems.
However, going the other direction is another story - feeding a 5 volt output of the Arduino to the 3.3 volt input of the TF, many can be very dangerous now that the inputs can be 5 volt tolerant to some extent. , but it's not always safe to assume that then you'll need to do something to lower that voltage. One way to do this is with a pair of drop resistors, but calculating the values ​​can be a little tricky because it really depends on the individual situation. The best way to do this is with something called a logic converter now these are very inexpensive devices and are available as single channel, 2 channel, 4 channel and 8 channel converters and they basically just take a 3.3 volt signal at one end and output a 5 volt signal at the other end or vice versa, they take a 5 volt signal at one end and output 3.3 at the other end.
Most of these devices are bidirectional, so it doesn't matter if you connect them to inputs or outputs, they will work as long as you keep all 3.3 volt logic on one side and 5 volt logic on the other side now on the board. I'm about to show you. I have a voltage converter right here. I don't know if you can see it, it's that small. The item here is just a two channel voltage converter, it basically has inputs and outputs for bothchannels plus a five-volt ground connection and a 3.3-volt connection. Now this 2 channel converter is a very useful thing to have in your workshop and they are very inexpensive, you can get these things on eBay and I suggest you buy a handful of them because you will find many uses for them.
I like two channels because they are very good for I 2 C Buses and very often with the i2c bus you have a situation where you have a 5 volt device and a 3.3 volt device like an Arduino and a Raspberry Pi and you want to join them again, it can be done with resistors, but it is the safest. The way to do this by far is with a logic level converter, so now that we have discussed this important aspect, let's take a look at how we connect our TF mini to our 5 volt Arduino Uno, so let's connect our TF Mini to an Arduino .
One, of course, we will need the Arduino Uno and the TF mini, as well as a logic converter to convert the 3.3 volt logic signals on the TF mini to the 5 volt signals required by the Arduino Uno. We will start by connecting the 5 volts on the Arduino to the VCC connection on the TF mini. We will also connect 5 volts to the V connection on the logic converter. Visit the The 5 volt power supply input will take the ground of the Arduino and connect it to the ground of the TF mini. We are also connected to one or both grounds on the logic converter.
A true fact, these are connected internally, so you really only need to connect one: the 3.3 volt output of the Arduino is connected to the three v3 inputs or the three 3 volt punk inputs on the logic converter. Next, we will connect pin 10 of the Arduino to one side of the 5 volt logic converter outputs. I'm using 5a, the corresponding 3a, which is the 3.3 volt side, which is connected to the txd connection on the TF mini in a similar manner. Pin 11 of the Arduino is connected to the 5 volt connection 5b on the logic converter. The corresponding 3 B connection is connected to our XD connection on the TF mini.
This table will show you the wiring and make it easy to follow, so now that we've connected it, let's look at a sketch we can use to test this. now before running this sketch to control the TF mini you will need to install a new library on your arduino ide so open the ide and go into the sketch. I'm going to include the library and go to manage libraries once the library manager opens, go to the filter box and type TF mini. There will be a library in the result and that is the one you want to install.
When you click the more info button, you'll get an install button here in my libraries. You can see that it is already installed once you have installed your library, just close the library manager, now go to the file, go to examples and scroll down until you get to the custom library examples in TF mini. You will see an example called basic reading, this is the code we are going to use, so select it and open it. I have done it here. Now it begins. The number of comments allows you to know which two pins we have connected the TF mini to because we are going to configure a software serial port on those pins, the Arduino Uno, like many Arduino models, only has one serial port and those are on the pins 1 2.
We would like to use a second serial port to connect the TF mini and use the original serial port for our serial monitor so we can use a software serial port we include the software serial library which is part of the Arduino IDE. Of course we will also include our TF mini library and then we configure the software serial library for pin number 10 and 11, these are the two pins that we will use to connect our TF mini we will also configure an object called TF many using the TF mini library in the configuration we initialize our serial port, this is the one we will use our serial monitor the speed at which we are initializing it.
Many of you run the serial port at 9600 baud. They will need to increase the speed because the data arrives quite quickly. We also initialize a software serial port. and we initialize the TF mini and assign it to that software serial port. Now the loop is very, very simple. We take two 16-bit unsigned integers and define them as a distance and the force and distance are the TF. Many objects gain distance. property and intensity is that the TF mini objects get the recent signal strength property, then we just display them on our serial screen, give it a short delay and do the loop over and over again, so now that we've seen the code, let's take a Look at it in action, okay, I have a little mini TF demo hooked up and you can see that the serial monitor right now is reading us directly one hundred 26 centimeters, which I'm sure I'm going to find is the distance between the sensors and my ceiling and I'm going to take this and move it around the room a little bit and as you can see we got several readings as we go around the room.
One thing I want you to notice is that I'm going to point this towards the table, you'll notice that I'm just a few inches away from the table. I'll do this against the wall, if you can't see that note, I'm

getting

a reading of 30 centimeters, which is obviously incorrect. that's because 30 centimeters is the minimum amount you can read with this sensor, but one thing about the sensor is that it is very directional, much more directional than an ultrasonic sensor and the data comes in very quickly. Remember you can get a hundred readings per second from the TF mini, as you can see this sensor is very accurate, it's very fast and would be a great sensor for a collision avoidance robot.
Ultrasonic sensors also work well for this, but since you can't take that many readings per second, it's always possible that an object could move in front of your robot between readings with something requiring a hundred readings per second, which is much less likely, so now that we have seen the TF mini, let's move on to the RP lidar device, the RP lidar is a 360-degree omnidirectional lidar scanner. It uses the principle of laser triangulation to determine distance. The unit can sample up to 8,000 points per second at 10 Hertz. The 10 Hertz refer to rotation speeds that would be 10 rotations per second.
It has an internal wireless connection so it does not use slip rings to connect to the rotating section, it has a range of 12 meters which is about 40 feet, the RP lidar has a seven pin connector here are the connections on the pins, notice there are two grounds, let's look at those connections in detail the GND connections are obviously the grounds rxd is the received data txd is the transmit data these are the five volt TTL level VCC is the five volt DC logic supply for the moto CTL device is the motor control input this is a pulse width modulation input to control the speed of the motor and V moto is the power supply for the motor which also requires five volts DC now the skanda speed of the lidar RP It is controlled by the speed of the motor which in turn is controlled by PWM.
The sampling frequency on the other hand is determined by the control software. These speeds can determine the scanning speed and accuracy of the device. Below are some examples of scans at different speeds and sample rates. Note the difference between the scans in terms of speed and the number of points recovered, so now let's start using the RP lidar for ourselves now, you may remember, when I unpacked the RPI lidar device, there were a couple of accessories Included, there was a small USB adapter, a cable that connected the USB adapter to the RPI lighter and a small card that gave you some information on the small card, you will find a link and I have the link repeated in the article associated with this video and this is to download some software, a software development kit and some sample applications, so I want to take a look at that right now, the software development kit and the applications are actually available for all three platforms i.e.
Linux, Windows and Macintosh. However, there is one app that is only available for Windows and it is actually the one that I think is the most impressive. That's why I brought a computer to the workshop. I already have two computers in the shop, but they're both Linux, so this is a Windows laptop that I'm going to use for this demo now that I've got my RPI lidar set up here in this little gig just to give it some space and I've got the connected serial device and I'm going to connect it via USB to my serial port on the computer now that I connect it for the first time.
You're going to notice that the RPI igniter just spins continuously because it's not being controlled so it's just

getting

power for the motor and I'll go on and on, let's take a look at what's in the SDK right now when you open it up you'll see two different directories , SDK and tools. Actually, today we will not look at the software development kit directory, but we will go into tools, so if you go into tools you will see that there are two folders. CP 2102 and win32 driver now before you do anything you will need to go in and install a driver for your computer.
Now it really depends on what type of computer you have, but most will need the 64-bit driver, which is what I installed though. If you have an older computer, maybe a Windows XP box that you're still using, it's possible. you want the 32 bit driver, so the drivers are here, just install the one you need and then go back and open this win. 3-2 and you will see a series of different applications, the ultra simple, the simple grabber and the frame grabber. The one that I think is the most impressive is the frame grabber, so I'm going to open the frame grabber right now and it will ask me what port I'm going to use.
It should be correct by default, so I'll say ok and give it a moment to open. You'll notice that the motor stopped right now while it was opening because it's now being controlled, okay, this is the frame grabber. I've maximized it to full screen here so you can see it and in order to do this test I want to introduce you to a friend of mine, this takes you to the background scenes. of the drone robot workshop filming process and my friend is this guy here. This is a little jig I built a couple years ago for filming and you'll notice it's about the same size as me.
I am both the person in front of the camera and the cameraman, since I can't be in two places at once to focus. I built this little device here and it has some focused goals and you know it. It also has a white background that allows me to do a white balance, but I found that when I was scanning in this very small room, it's actually a pretty good target to demonstrate rpi's lidar, so I'm going to use this device. Targeting right now, anyway, like I said, the room is very small and remember the minimum range of this device is thirty centimeters, so you're not going to get a great reading in this small room.
This would work much better in a larger room, but you'll still get an idea of ​​how it works, so I'm going to start the scan right now and you start by pressing this little button here and as you can see, we're getting some scan results. now let me show you something I'm going to put my target here now can you see a straight line inside? Let's move the straight line. Do you see that line moving this way? Let's move it over here. Move it there. That flat line. What you're seeing is actually the surface here on my lens.
Now there's something else moving in here as well and if you watch, it's like sitting at the 240 degree mark right now and it's moving a little bit down and it's moving a little bit up, of course it's me, I is picking up there and otherwise you'll notice that everything is mostly confined to the center except for a few points down around the 150 degree mark and that actually represents a door opening that you can't see is right behind it. you here, it's coming out of the counter, so it actually came out and it's aimed at a couple of objects in the next room, which FYI is my laundry room, so it's probably hitting the dryer or something .
Right now, in any case, it's a very impressive little screen and it also shows the kind of data that you can get from a scanner like this and that's the kind of data that an autonomous vehicle would use to determine its position, so now Now that we've seen that, let's see if we can make some more use of our API lidar device, so for this experiment we'll need an Arduino Uno, of course, we'll need our RP lidar device. You will also need a common anode RGB LED. Please note that this is a common anode and not the more popular common cathode variety.
You will also need three resistors. I used 150 ohm resistors, but any resistor in that range should suffice. Now let's get to the connections, first we're going to connect things from the RP lidar to the Arduino, so on the RP light connector starts at the top, we'll connect the ground connection to the Arduino ground, the RX or the reception on the lidar RP will be connected to the transmission line on the arduino, which is pin number 1, theTX transmit on the RP lidar will connect to the Arduino receive which is pin number 0, the v 5.0 connection on the RP lidar is the 5 volt power supply and we will connect this to the 5 volt output of the Arduino.
The next connection is ground and will connect to the existing ground connection. The Moto CTL connection is the motor control connection for the RP lidar. This will be connected to pin 3 of the Arduino so we can send a pulse width modulated signal to control the speed of the motor and finally the V mode. This is the power supply for the motor. You can now connect it to an external 5 volt power source if you wish, however, in this case. I'm going to use the Arduino's 5 volt supply, the RP lidar device has noise filtering to prevent some of that noise from entering the data lines; however, again you can use an external 5 volt supply if you prefer, we will now connect that. above the led the common anode of the LED is going to be connected to pin 12 of the Arduino this allows us to enable and disable the LED the red connection on the LED is connected through a 150 ohm resistor to pin 9 of the Arduino the green connection it goes through another 150 ohm drop resistor and connects to pin 10 and finally the glue connection also goes through its drop resistor and then connects it to pin 11 on the Arduino and now that we have seen how to connect this Let's take a look Take a look at a sketch we'll use to run our demo now.
To use the art P lidar with Arduino, you will need to get some code. To do this and add a driver to your Arduino IDE, the RP lidar SDK is available on github and I have the link for that in the article associated with this video, as well so go there and check it out now, you can download it in full. something like a zip file and I would recommend you do that to take a look at the items in it. However, that zip file cannot be installed directly into your Arduino IDE, it's simply a matter of it not being structured correctly.
I explained this in the article and I will show you how you can create your own zip file and for your convenience I have also created one and you will also find a link to it in the resources section of the article in the drone workshop communication. website, so once you have the zip file, go to your arduino ide because you will need to install it, go up to sketch, go to include library, add the zip library, select the folder where you downloaded your zip file, in my case, the download file. and then select the RP lidar driver and then click OK to install it.
I won't do that now because mine is already installed once you have it installed there are two example programs that you can look at go to examples and go to RP light our. controller and you will see the distance to color and simple connection. Let's take a look at the simple connection. The simple connection is really just a template that you can use to write your own for the RP lidar device and so in appearance it really isn't. do anything on its own, it's basically a template that you'll be able to use to write other code now, if you decide to run this in the air, we know the IDE will work fine, but the only thing you'll notice is that the lidar device will spin and nothing will happen more, but it will basically bootstrap whatever code you're using for this device by including the lidar RP library and then create an instance of that driver that we're calling lidar, you'll also define the pin that you're using to control the speed of the motor.
Now we are using pin three. You could use another pin, but it has to be one capable of modulating the pulse width because that is how the motor speed is regulated. motor which in turn regulates the scanning speed of the lidar in the settings, it needs to start powering up our object to use it and points it to the serial because our igniter device is connected to pin zero one, which are the serial ports on an Arduino Uno now remember that these are the same places where the USB connection is connected on the Arduino Uno, so you can't actually use both at the same time, you will need to power your uno with something other than your computer in order for this to work, upload your code and then unplug it from the computer and power it up with something else, the next thing we do in setup is we simply set the RP light on our motor pin that we have defined on pin three. our case as output and then we enter the loop and these are basically the basics of reading data from lidar RP device.
We find out if the lidar is at a weight point. We say if it's okay. Is it at a weight point? If we get the current point, we get data for each point that we scan and remember we can take it up to eight thousand of these points per second if we run this at full speed. Now getting the current point can give us the distance and angle there is. also a boolean value that tells you if this is the first bit in a scan, so there is this number one of the entire scan or not, and the signal quality is also set as a byte value here now if we get those data.
We can do our own data processing down here and use these variables within our processing and in fact when we write some appropriate code for this, that's exactly what we'll do, if it's not on point then we stop the engine what we try it detects the light on our device and if it is detected we scan it and then start the engine again and those are the basics of using the igniter device. Now there is another example. I'm not going to go into it in great detail because there is a lot to say, there is more detail explained in the article if you are really interested, but I just want to show you that this is the distance of the color example and this is actually the one that you are going to load in your Arduino IDE that we have connected with the RGB LED.
The interesting thing about that RGB LED, as you may remember, is that it is a common anode device, while the common cathode device is a little more popular. The common anode device needs its common section connected to 5 volts, however we have connected it on pin 12, as you will see here, so when we enable this pin, when we send it to 5 volts and pull it high, it provides the 5 volts through the common wire on the LED, this allows us to actually turn the LED completely on and off through the control of this pin we define pins 9 10 11 as the RGB pins the rest of this is very similar again we are defining the PWM connection to the motor like pin number 3 we have some functions that essentially convert color from angles so we take the color display angles, float angle, float distance and use this function and the previous one to create a unique color for that particular angle and, if you check, you can read the parameters that they contain.
I have set these up here. I'm not going to go over it now because this is going to get a little confusing and in settings we'll go and do the same thing. We will start the serial link. We will set the Quinns that we have defined as outputs and this here actually enables the LED but turns it off keep in mind that a common anode LED at 255 is actually completely off and a zero is completely on, we define a couple of other variables a couple of floats through the minimum distance and the angle of the minimum distance and then in our loop we do basically what you saw in the previous example, if it is at a weight point, we do the data processing, we get the angle at the distance and we assign it to otherwise we go and try to turn on the light on our device over and over again, so I know it's kind of a quick look, not the normal detail that I give you about the code, but you can take a look at the code and you will see.
Basically, see what you're doing, now that you've seen it, let's take a look at the code in action, so load up the distance to color sketch on your Arduino and we'll look at it okay, so I've got my PR. lidar and Arduino and LEDs connected here on the workbench. I just had the RGB LED on this little solderless board which is also where I connected the lidar RP connections and a little hint if you're trying to do it yourself is how to make a connection to that connector I didn't have that type of connector but what I found out is that this male connector actually worked very well.
What you do is you plug the connector into the short ends here and then you can plug it in. the long ends on their solderless breadboard, so it really worked well and was pretty easy to connect the RP igniter. Now you'll also notice that I mounted the RP lidar on a stand and the reason is if I keep it low at this level on every scan it will actually start to affect the components of my Arduino and my solderless board and we don't want that now. I hope you can see the RGB LED because it's actually quite interesting to see this work, but I've had some difficulty filming the RGB LEDs, so I hope you can see all the color changes I'm seeing and if not, I apologize Now, I'm running everything on 9 volts. battery, remember that you can't use the USB port for this because the transmit and receive USB port shares the same pins as pins 1 and 2 and we are using it for the RP lighter and using the library that we use right now.
I can't find a way to switch to serial software so we have to run this without being connected to the computer so let's connect the 9 volt battery and the lidar starts up and our light turns on and as I move my target which is In this case this will be my hand around the lidar device, hoping that you can see that I'm getting different colors on the LED and as I get closer and further away the colors tend to change, remember if I move away too much, it will activate on the next closest object it finds, which is probably one of the items on my artboard.
I tried to clear the area as best as possible but as I hope you see the color goes through some pretty dramatic changes depending on where the target is and that's really cool, obviously not a practical use for the device but it shows the fact that It is capable of detecting the angle at which the reflected object is located and that within the 360 ​​degree perimeter it also detects the distance at which the object is located. This depends on the hue or intensity of the LED, and of course this data could be used for much more practical purposes, including in a self-driving car.
Although a simple demo, this shows you how lidar RP can be used. connected to an Arduino, well that's it for today's video, but it certainly isn't for these two sensors. These devices are too awesome to dedicate a short video to, so I'm going to build a project with each of these devices now with the TF mini lidar. I will have a pan and tilt mechanism that I want to connect to it. I saw another YouTube project using another lidar device where they did a 180 degree scan of a room. horizontally and vertically and I created a really cool point cloud with it and I think I could probably do the same with the TF mini, so I'm working with that right now and as soon as I get it working I'll post a video and article. to show you how to do it now, as for lidar RP, it's an amazing device and the obvious use would be in an autonomous vehicle.
Now I have a robot car base, not the normal plastic one I use, but a really nice metal one. one of the DF robot that I bought about a year and a half ago and haven't used yet. I think it would be the perfect companion for this RP lidar device and I'm going to start working with it, it may take a while. For a while, but I intend to try to start working with an autonomous vehicle using the device and of course once I have something I will post a video and article to show you how to do it, now the best way to know these videos . and its corresponding articles is to subscribe to the YouTube channel, so if you haven't already, hit the subscribe button below.
I would also appreciate it if you could also subscribe to the Drone Robot Workshop newsletter. You'll find a link below the video, as well as a forum on the Drone Bot Workshop Communication website. Now the newsletter is my way of keeping in touch with you to let you know what I'm working on in the workshop, but also to find out what you'd like me to work on in the workshop and what articles and videos would be useful to you, so please subscribe to the newsletter and be part of that community until next time, take care of yourselves and I hope to see you again very soon. soon here in the workshop goodbye for now you

If you have any copyright issue, please Contact