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

Do you only need one place to change the I2C address? #8

Closed
bpjdons opened this issue Jan 20, 2020 · 9 comments
Closed

Do you only need one place to change the I2C address? #8

bpjdons opened this issue Jan 20, 2020 · 9 comments

Comments

@bpjdons
Copy link

bpjdons commented Jan 20, 2020

No description provided.

@budryerson
Copy link
Owner

You need to use the TFMini-Plus-I2C library to change the TFMini-Plus I2C address. You may want to raise your issue in the repository for that library.

In the TFMini-Plus-I2C library, you will need to send a SET_I2C_ADDRESS command to change the I2C address, followed by a SAVE_SETTINGS command to save the change. If you change the I2C address to one that is different from the default address (0x10), the library requires that you include the new, none-default address in every subsequent command.

I'm not sure I understood your question, so I hope this helps.

@bpjdons
Copy link
Author

bpjdons commented Jan 22, 2020 via email

@bpjdons
Copy link
Author

bpjdons commented Jan 23, 2020 via email

@budryerson
Copy link
Owner

Bram,

If you send a command to the TFMini-Plus to change from UART to I2C communication mode, all further communication must be in I2C format. When the device is in I2C mode, you will not be able to use the SSCOM application.

However, while the device is powering up, it will be in serial mode for about ten seconds. During that time, you might be able to reconnect with SSCOM and send the command 0x5A050A0069 to reset the device to UART mode.

And yes, you can use an Arduino Nano to communicate with the TFMini-Plus in either UART or I2C mode.

Good luck,

Bud

@bpjdons
Copy link
Author

bpjdons commented Jan 23, 2020 via email

@budryerson
Copy link
Owner

Bram,

I sincerely doubt that the firmware is corrupted or that SSCOM is not working correctly.

My suggestions are:

  1. try using your Arduino Nano to communicate with the TFMini-Plus in I2C mode;
  2. try to reach the device with SSCOM during the 10 second power up period;
    (You didn't include the "0x" in the command 0x5A050A0069 you sent, did you?)
  3. please, please try to communicate your problem clearly, precisely and thoroughly. Include every step of your procedure and include all relevant code that you are using. It will help you to think things through;
  4. pictures of your setup and screen shots would be very helpful; and
  5. never give up.

Bud

@bpjdons
Copy link
Author

bpjdons commented Jan 24, 2020 via email

@budryerson
Copy link
Owner

Bram,
Show me how are you connecting SSCOM to the TFMini-Plus?
We are way off topic, so let's take this out of Github.
Write to me at: bud@budryerson.com
Bud

@budryerson
Copy link
Owner

budryerson commented Apr 24, 2020

Bram was trying to setup three TFMini+'s to work together on a drone with a shared I2C bus. He was having difficulty changing the I2C address and then maintaining communication with the devices. Here are a couple of things we both learned:

  1. Spaces are not allowed in Arduino sketch filenames. Remember that!
  2. While still in UART communication mode. you can command the device to change its I2C address The default address of the TFMini+ is 0x10.
  3. The value of an I2C address cannot be checked in UART mode. For that, you have to:
    a) command the TFMini+ to change communication mode to I2C;
    b) change your wiring to connect with the I2C bus pins; and
    c) test the I2C bus for the presence of a device at that address (or better, check for all devices on the bus at any address.)
  4. Thereafter, you can only communicate with the TFMini+ in I2C mode. You can use the TFMini-Plus-I2C library for this purpose. For any device not set to the default address of 0x10, remember to include the correct I2C address with each command, including the command to getData();.
  5. Sending a command to Restore_Factory_Settings will not change the communication mode back to UART. However, it will change the I2C address of the TFMini+ back to its default value of 0x10.

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

No branches or pull requests

2 participants