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!
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
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 :-/
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
Thank you Steph and Sara Santos !
It was a problem with the serial bus pins, it was useful to define the pins.