DIY Turning Lidar Part #0

Lidar is distance sensing device which outputs data describing distance. It uses light, that’s why it’s called li-dar (dar is from radar which use sound).  It fire an IR ray in the specific angle and detect strength of IR ray coming back to the receiver part. I was using Sharp IR distance measuring sensor which is not precise but It’s easy to use and cheap. Then I found VL53L0X sensor. It’s based on Class 1 IR Laser, so the ray is more like line and It can provide data via I2C interface to your MCU. This sensor can be turned 360° over and over and sensing environment around. I wanna to build such Lidar sensor. The first thing you will need is something that allows you to turn cables many times without tangling. That is called Slip Ring. You can find it on AliExpress, it’s not thing for few cents…
Slip Ring

The next is sensor, which can provide very fast measurements. Let’s say we want make a whole turn once a second and measure every 10°. That’s 36 measurements in 1000 millisecond, so ~28ms for measurement and sending data to out MCU! The fastest mode of VL53L0X takes ~20ms, so if we add some time for sending to MCU, it could be possible. I will talk about combinating more sensors to achieve speed in the next article.

Smartwatch Journey – Part #9

The target architecture

Every project will start be messy. Especially code. You add something new, remove old stuff, fix not working code… It can be hard to read your code after a month. So, I decided to clean up the code and build an architecture to be easily understandable and I can always add new stuff without worrying.

  • Reduce state variables
  • Add Screens with Screen Manager
  • Send input to Screen Manager for process

This is how the final architecture should look like. Many things are the same as in old code. But implementating Screen Manager will give me a opportunity to add another screens with menus.

The main idea is to have the Main screen with time. The short click will force to refresh the time and the long click will open Menu screen. The Menu will contain few rows – labels of another Screens that can be entered by long click and you can move a row down with short click. The last row will be exit. I imagine the first row as link to Notes, so I can see some notes saved in smartwatch. I can do this now with long click. Settings like how long to show notification on the screen or what to show on the screen or how…

Let’s see