Skip to content
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

Create block for TFMini rangefinders #1715

Open
dlcarrier opened this issue Jan 23, 2020 · 4 comments
Open

Create block for TFMini rangefinders #1715

dlcarrier opened this issue Jan 23, 2020 · 4 comments

Comments

@dlcarrier
Copy link
Contributor

The TFMini rangefinders work with a collection of blocks, but to bring it in line with support of other products, it would need a single block, likely with I2C and serial support. They use the same protocol, so a single code base should work.
The product pages are at: https://www.parallax.com/product/28350 and https://www.parallax.com/product/28360

@MatzElectronics
Copy link
Collaborator

MatzElectronics commented Jan 23, 2020 via email

@zfi zfi added the Discussion label Jan 23, 2020
@PropGit
Copy link
Contributor

PropGit commented Jan 23, 2020

I checked: the first page is just a placeholder; no information except a picture. The second link doesn't exist yet.
image

Here's code and datasheets from the product folders...

For the TFmini-S:
TFmini C Example v1.0.zip
TFmini-S-01 A00 Datasheet.pdf

For the TFmini Plus:
TFmini Plus-01-A04-Datasheet.pdf

@MatzElectronics
Copy link
Collaborator

MatzElectronics commented Jan 23, 2020 via email

@JonMcPhalen
Copy link

Warning: The TFmini and the TFmini-S use different command protocols -- the latter being an improvement over the former. Out of the box the device sends a 9-byte packet every 10ms; inside that packet is the distance measurement (defaults to CM).

The TFmini-S is easy to use; I have coded experimental code in Spin (will port to an object later), and I did a simple demo in Blockly for Ken.

The problem with Blockly is that the serial blocks do not include an RX Flush block -- and this is important when dealing with a device that is constantly transmitting. In my demo I used a custom block to call fdserial_rxflush() -- but if Ken changes the pin numbers on the serial initialization block, he'll have to edit the custom block.

Anyway, he has the code and will make it available at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants