Single-point TOF Laser Ranging Sensor*1
Breadboard*1
Jumper Wires *1
Suitable size carton*1
Decorative Stickers
Paper cutter*1
Step 1: Hardware1: Connecting Matouch -1.9’ display to the breadboard;
2:Connect the Laser Ranging Sensor and the Matouch 1.9" display in the breadboard with jumper cables;
Please note:
Red wire:Power,connect to Matouch-1.9’display 5V
Green wire:RX to Matouch-1.9’display IO3
White wire:TX to Matouch-1.9’display IO1
Black wire:GND to Matouch-1.9’display GND
Step 2: Create a New Project on LVGLextern int work_flag;
void open_func(lv_event_t *e)
{
// Your code here
lv_obj_add_state(ui_Button1, LV_STATE_DISABLED);
lv_obj_clear_state(ui_Button3, LV_STATE_DISABLED);
work_flag = 1;
}
void close_func(lv_event_t *e)
{
// Your code here
lv_obj_add_state(ui_Button3, LV_STATE_DISABLED);
lv_obj_clear_state(ui_Button1, LV_STATE_DISABLED);
work_flag = 0;
}
Step 10: Copy the Four Files to the Arduino Libraries, Usually in the Form of (C)/Users/Document/arduino/librariesThe code of leaser range can be refer to our github page
Note: the Arduino esp32 board should be 2.0.17 and its previous version, we used 2.0.11 version
Step 12: Modify Your CodeUse the Type-C USB cable to connect the board to the PC, select the development board "ESP32S3 Dev Module" and its port.
Step 13: Click Upload CodeCut the box to size. Secure the assembled hardware inside the box.
Step 15: ResultAs you can see in the picture above, this device works great.This handy little device can test the distance up to 20m and has an accuracy of 3cm. If you're interested, we've got a great tutorial that'll show you how to make your own laser rangefinder.
Step 16: Detailed Operation VideoTo gain a more comprehensive understanding of the assembly testing process, we invite you to view the accompanying video. We look forward to sharing further DIY projects with you in due course.
Comments
Please log in or sign up to comment.