Code Monkey home page Code Monkey logo

Comments (10)

budryerson avatar budryerson commented on August 27, 2024

I'm sorry for the delay. You've probably figured it out by this time.
But will you please send me all your code so I can duplicate your problem?
Thanks,
Bud

from tfmini-plus.

runfastman avatar runfastman commented on August 27, 2024

from tfmini-plus.

budryerson avatar budryerson commented on August 27, 2024

There was no attachment with your last message.
Please send me your entire sketch ("all your code") so that I can duplicate your problem.
You may send the archive to my email [email protected]
Please include images of your setup and cabling, if you think that will be helpful.
Thanks,
Bud

from tfmini-plus.

budryerson avatar budryerson commented on August 27, 2024
  1. You listed only two lines of output:
    SET_Mode: Status: SERIAL
    00 00 00 00 00 00 00 00
    Is that it? Only two lines? No "Hello"?
    Something like:
    TFMPlus Library Example - 18JUN2020

  2. Your Software Serial assignment of Pins 0 & 1
    SoftwareSerial mySerial( 0, 1);
    appears to use the same pins as the hardware serial port.
    Are you sure about those pin assignments?
    Which Arduino board (and revision) are you using?

  3. Is the Arduino working? Is the sensor working?
    Is the Arduino working okay with the sensor in Serial mode?

We'll fix this.

Bud

from tfmini-plus.

runfastman avatar runfastman commented on August 27, 2024

from tfmini-plus.

budryerson avatar budryerson commented on August 27, 2024
  1. I apologize for any confusion. Your [images] are not showing up here. Please save your output into a text file and attach or send me the file.

  2. The D0 & D1 pins on the Nano V3.0 Module ATmega328P 5V 16MHz CH340G are the hardware serial lines that you use to program and communicate with the Nano from your IDE (running on your PC). The Nano has an onboard USB to TTL converter (CH340G) that requires the use of these pins. You cannot use these same pins to communicate with your TFMini-Plus. That's why we use the Software Serial library - because the ATmega328P does not have a second hardware serial port. I believe that pins 9 & 10 will work for that purpose (11 & 12 are for the SPI interface) ; but please check the Software Serial documentation for your particular board.

    You say that your Nano and your TFMini-Plus are working together just fine in Serial Mode. I don't see how that is possible, so I must really be misunderstanding something. Again, please send me a text file of your output from running the example sketch in the Serial Mode. Pictures of your wiring would be helpful, too.

  3. You are correct that the I2C Mode is the way to go. It will allow you to use more than one TFMini-Plus on the same bus.

Bud Ryerson
San Francisco

from tfmini-plus.

runfastman avatar runfastman commented on August 27, 2024

from tfmini-plus.

budryerson avatar budryerson commented on August 27, 2024

Your images are still not showing.

You wrote that, "the sensor is working and giving me the correct distance with serial." So I asked to see the output from TFMP_example.ino, the Serial Mode example sketch, running correctly. I don't see that. In the output you show above, every command has failed.

You wrote, "I do have to unplug the tx/rx wires to flash but then I plug back in and hit the rest button and monitor the output."
Why are you plugging and unplugging wires? Which "tx/rx wires" are you talking about? How do you "monitor the the output?"

I get the uneasy feeling that you are still confusing hardware and software serial ports. The hardware serial port is for programming and monitoring ONLY. The Software Serial port is for communicating with the Lidar. Am I wrong?

Please let me know.

Bud

from tfmini-plus.

runfastman avatar runfastman commented on August 27, 2024

from tfmini-plus.

budryerson avatar budryerson commented on August 27, 2024

Please understand that the Lidar device communicates with the Arduino - and the Arduino then turns around and communicates with the user (you). This requires two independent data channels. The USB cable connects the Arduino with your computer. It uses the D0 & D1 (TX/RX) pins. You cannot EVER use those to connect to the Lidar. You must use the Software Serial pins. BUT As soon as you send a SET_I2C_MODE command to the Lidar, that device can no longer communicate in serial mode. So DO NOT send any commands to change the communication mode until after we've got everything working in serial mode. Okay?
I am still not getting your files or images. Please contact me further by email at:
bud-at-budryerson-dot-com

from tfmini-plus.

Related Issues (20)

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.