Comments (8)
That's interesting... can you point me to a datasheet for the TF mini plus?
from tfmini.
http://en.benewake.com/res/wuliu/docs/15487893679657874SJ-GU-TFmini%20Plus-01-A02-Datasheet_EN.pdf
here is the page for datasheet download
from tfmini.
Here's a datasheet from Sparkfun: https://cdn.sparkfun.com/assets/2/b/0/3/8/TFmini_Plus-01-A02-Datasheet_EN.pdf
It looks like it's using very different commands than the TF mini. Feel free to update the driver (I would make a second class, TFMiniPlus). Or if someone sends one my way, I can try to do this update in between things.
from tfmini.
thank Peter,
I have tried to skip checksum byte comparison in the library.
the output with some error as shown below:
204 cm sigstr: 1354
204 cm sigstr: 1351
204 cm sigstr: 1350
52569 cm sigstr: 17408 (error)
22873 cm sigstr: 204 (error)
204 cm sigstr: 22855
205 cm sigstr: 1354
204 cm sigstr: 1347
205 cm sigstr: 1356
52313 cm sigstr: 17152 (error)
22988 cm sigstr: 52057 (error)
204 cm sigstr: 1360
203 cm sigstr: 1356
from tfmini.
I notice that no matter the output distance is correct or not, checksum byte comparison will always be different.
checksum : checksumByte
0x69 : 0x59
44 cm sigstr: 5598
0x67 : 0x9C
22828 cm sigstr: 2390 (error)
0x62 : 0x6B
44 cm sigstr: 5591
0x68 : 0x0
44 cm sigstr: 23000
0xBC : 0x15
22828 cm sigstr: 11353 (error)
0x9B : 0xFB
2390 cm sigstr: 5593 (error)
0x68 : 0x59
44 cm sigstr: 5597
0x74 : 0x98
22873 cm sigstr: 44 (error)
// I don't know why...
from tfmini.
I found the cause that make checksum error.
// Store running checksum
if (i < TFMINI_FRAME_SIZE-2) {
checksum += frame[i];
}
code in file TFmini.cpp Line No. 140
I replace 2 with 1
// Store running checksum
if (i < TFMINI_FRAME_SIZE-1) {
checksum += frame[i];
}
it works normally now.
from tfmini.
Thanks thats worked for me to.
from tfmini.
In addition to Ratthanin's check sum change, I found I had to change takeMeasurement() also.
From
uint16_t dist = (frame[1] << 8) + frame[0];
uint16_t st = (frame[3] << 8) + frame[2];
To
uint16_t dist = (frame[1] << 7) + frame[0];
uint16_t st = (frame[3] << 7) + frame[2];
from tfmini.
Related Issues (12)
- No data showing in serial monitor HOT 4
- 2 Sensor Issues
- How do I connect tfmini with Particle Photon?
- tfmini.getDistance() gets stuck at 65533 after first working correctly. Fixed by unplugging USB and reuploading sketch. HOT 1
- Issue with checksum calculation HOT 1
- SingleReading.ino got an issue
- Distance displays 65535cm at low sigstr HOT 2
- 2 Lidar Error HOT 1
- TFMini not compatible with ESP8266 / NodeMCU 12E HOT 10
- External trigger issue HOT 1
- Change sampling rate.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tfmini.