-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TFMini not compatible with ESP8266 / NodeMCU 12E #6
Comments
You are wright. I tried to use TFMini with Wemos Mini Pro D (with ESP8266 Core Processor), At the begining worked OK, but suddenly appears that message. TF Mini error: too many measurement attempts Do you know what can I do?, Do you have a code to reset o do something to fix it?. It's hard to believe that software issue could damage forever the sensor. This problem doesn't happend with Arduinos?. Can you share please a zip file with your example project and corrected serial communications libraries to use TFMini with ESP boards (like Wemos)?. The other solutions is have to use an Arduino Pro Mini working at 3.3 Volts to communicate with TFMini. Greetings. |
HI @jucall , can you provide your code please , i'm also trying to use this lidar but to no success . Thank you. |
Is there a solution to use TFMini with NodeMCU 12E ? |
@speedymk1 Hello,I don't have the code but from what i remember you need to delete all the serial.print and serial println from tfmini.cpp. That should do the trick. If it did please confirm this. Thank you. |
@pedrooct Step 1 -> modify the TFMini.cpp:
Step 2 -> my testing code:
|
@speedymk1 so it work right ? |
Yes, it work how it should. |
Amazing and thank you for your solution 😀 . Also FYI this solution works even for TF-LUNA LIDAR |
I followed the above two steps and code. However, I got the following message. How can I solve the problem? Many thanks. TF Mini error: too many measurement attempts |
Finally the results showing "65535 cm Signal: 65535" were not correct, I am sincerely asking possible help. Many thanks. |
Note: If you are trying to run BasicReading.ino on a ESP8266 / NodeMCU 12E, then you will need to make sure you are using ESPSoftwareSerial library and not standard SoftwareSerial otherwise tfmini.getDistance(); will cause a crash and soft restart in an infinite loop.
On running the BasicReading.ino example, changing pins for mySerial to D7 as RX and D8 as TX, and enabling TFMINI_DEBUGMODE the call to tfmini.getDistance() causes this error:
ERROR: no header
Sometimes it also returns a reading but this is just a bogus number.
From the last few hours trying different approaches, I don't think TFMini is compatible with ESP8266/ NodeMCU 12E due to the high baud rate expected from ESPSoftwareSerial.
It would have been great- a cheap WiFi connected LiDAR so I'm hoping I can be proven wrong.
The text was updated successfully, but these errors were encountered: