Coder Social home page Coder Social logo

Comments (8)

PeterAJansen avatar PeterAJansen commented on July 25, 2024

That's interesting... can you point me to a datasheet for the TF mini plus?

from tfmini.

VaAndCob avatar VaAndCob commented on July 25, 2024

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.

PeterAJansen avatar PeterAJansen commented on July 25, 2024

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.

VaAndCob avatar VaAndCob commented on July 25, 2024

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.

VaAndCob avatar VaAndCob commented on July 25, 2024

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.

VaAndCob avatar VaAndCob commented on July 25, 2024

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.

sfambach avatar sfambach commented on July 25, 2024

Thanks thats worked for me to.

from tfmini.

DaveDixon avatar DaveDixon commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.