• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

TFMini PLus & ESP32

Q&A Forum › Category: ESP32 › TFMini PLus & ESP32
0 Vote Up Vote Down
Manuel Conde Rodriguez asked 5 years ago

Hello,
I am trying to connect a TFMini PLus to an ESP32 but I am not succeeding. Has anyone managed to read the data from the TFMini Plus distance with an ESP32?
Is there any sample code that works with ESP 32?
Thanks in advance!

Question Tags: TFMini PLus
6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
Unfortunately, we don’t have any tutorial about that, and we don’t have one TFMini Plus to experiment with 🙁
I’ve found this library for arduino: https://github.com/budryerson/TFMini-Plus
I’m not sure if it is compatible with the ESP32. You can try uploading the example code and see if it works.
Regards,
Sara

0 Vote Up Vote Down
Manuel Conde Rodriguez answered 5 years ago

Thank you Sara,
unfortunately the Arduino library doesn’t work for ESP 32.

0 Vote Up Vote Down
Steph answered 5 years ago

Hi Manuel,

I don’t have a TFMini Plus and I’ve never used it… nevertheless, what’s your problem? Is it just a problem with the serial bus connection?

In which case, you should know that the ESP32 has 3 hardware serial UART buses. You are free to use the UART2 bus which will not conflict with the microcontroller functions:

#define RX2_PIN 16
#define TX2_PIN 17

void setup() {
    //          baud rate  protocol
    //              v         v
    Serial2.begin(921600, SERIAL_8N1, RX2_PIN, TX2_PIN);
}

Hopefully your problem isn’t somewhere else.
Otherwise I’m afraid I can’t help you as I don’t have a LIDAR at my disposal :-/

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Manuel, Stéphane is right.
You probably need to use Serial2 to use the ESP32 serial pins and make it compatible with the ESP32
Regards,
Sara

0 Vote Up Vote Down
Manuel Conde Rodriguez answered 5 years ago

Thank you Steph and Sara Santos !
It was a problem with the serial bus pins, it was useful to define the pins.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Great!
I’m glad it’s solved.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.