Git Product home page Git Product logo

lidar's Introduction

lidar

Use a 15 Dollar LIDAR with Python (PyGame) connect to USB port through TTL Serial adaptr FT232RL and get a radar image of 15 m of surrounding mount_kuva

As an impulse buy, I bought a very cheap LIDAR. Partly also becuase I already saw from a youtube blogger that it is possible connect some lidars to the arduino. And even though the construction of the robot still seems like a too large project for me, well, I can still have dreams. ... to use servo motors, an arduino and other sensors to make such a nimble looking toy that can drive around my flat, and of course the Lidar would be the eye of the robot, so that it would not crash into doors and hurt himself, but my robot would always stop safely before any obstacle. This is still a complete dream. The hindrance is a lack of time and maybe also patience. I would probably need quite many weeks in a row to focus only on this, but I can't spend all weekends on this, after all, I have many other hobbies and other mandatory household chores. Anyway, this little project could be one little step forward on the long road to making my own robot. This is the link to where I bought this wonder device.

laser radar 360 degree laser radar scanning distance measuring sensor diy wireless transmission infrared data transmission https://www.aliexpress.com/item/4001253880158.html?srcSns=sns_Copy&spreadType=socialShare&bizType=ProductDetail&social_params=40156039994&aff_fcid=179e6e5691cb4b25a5de34ada54bb854-1687105547160-07172-_AC9Mk3&tt=MG&aff_fsk=_AC9Mk3&aff_platform=default&sk=_AC9Mk3&aff_trace_key=179e6e5691cb4b25a5de34ada54bb854-1687105547160-07172-_AC9Mk3&shareId=40156039994&businessType=ProductDetail&platform=AE&terminal_id=6586cbe945ed478fb0836eef7c989927&afSmartRedirect=y

When I bought this LIDAR, I still imagined that I would connect it directly to an Arduino, at least that's what the Swiss blogger did, where he had a completely different converter, which I also bought, but which is now still awaiting its destiny while lying around among in the heap of my other electronic stuff. But actually this connection directly to the USB port of the computer is at least for me already easy, because the programming tool Visual Studio Code, and python is pre-installed and reasonably familiar to me. The required plug-in module for the computer's USB port can be found at the following link. According to wikipedia TTL stands for Transistor-Transistor Logic, the name means that transistors, bascially 2 circuits in series both amplifiy and performs logical functions. I don't think it means anything, but it's a converter between the USB port and the RS232 serial signal. I still remember that the abbreviation RS232 appeared with the C64 computer. Link:

High Quality FT232RL FT232 FTDI USB 3.3V 5.5V to TTL Serial Adapter Module Mini https://www.aliexpress.com/item/1005004845060316.html?srcSns=sns_Copy&spreadType=socialShare&bizType=ProductDetail&social_params=60247360179&aff_fcid=8bd666089e2640f791c36d2de641571a-1687104580404-02556-_EuQy4pp&tt=MG&aff_fsk=_EuQy4pp&aff_platform=default&sk=_EuQy4pp&aff_trace_key=8bd666089e2640f791c36d2de641571a-1687104580404-02556-_EuQy4pp&shareId=60247360179&businessType=ProductDetail&platform=AE&terminal_id=6586cbe945ed478fb0836eef7c989927&afSmartRedirect=y

There is also a reference on Lidar's sales site to find the right program snippets for decoding the signal. This Discord discussion group came into the public eye because an American posted secret photos and other information about the war in Ukraine, apparently just bragging how much he knew. On that specific channel named mb_1e2tydlidar-s4b there is a man called VIDICON who has been investigating this lidar deeply. Apparently the seller has not provided any documentation about this device. Not to say that it is not untypical of Chinese vendors. VIDICON apparently has the appropriate signal analysers to gradually work out what all the its and bytes of data packet means that the device is putting out. Wow, I have great respect that such gurus like VIDICON are around in this world. By the way, even though the code comes from github, that for me it was not exactly a one-to-one, but I had to experiment a bit, what kind of baud-rate it works with, turned out to be 153600. Fortunately my computer already had python installed with VS Code, but I had to add the additional modules pygame, serial, math and enum. I can't remember, something similar like sudo apt-get install -y enum was necessary or maybe the equivalent on a windows machine.

discord discussion channel radar_mb_1r2t_ydlidar-s4b https://discord.com/channels/647756128058605581/861328431932768296

The program as listed here is not exactly the same as the github program, but in addition to baudrate, I changed the pygame command set_at, which produces only a very faint dot on the screen, and replaced it with a rectangle pygame.draw.rect, which is much better visible. I also tried pygame.draw.circle, but it's just too slow, makes a lot of horizontal lines on the screen. I also changed the magnification factor, distancef = distance / 40 then when I want more details to be highlighted, my own face profile as an example, then I set this factor to 3. However, I am quite unfamiliar with pygame and the whole program is like Hebrew to me, especially this class State(Enum). I'll still have to get familiar with it. connect

https://www.youtube.com/watch?v=J1RYwebzSwI&t=4s

lidar's People

Contributors

reinhardlenz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.