Git Product home page Git Product logo

Comments (10)

revell1 avatar revell1 commented on August 26, 2024

My first guess would be that when you use "i2cdetect" it is using the correct pins for SCL and SDA, but when you use
the line of code
"i2c = board.I2C() # uses board.SCL and board.SDA"

then that code is using different pins.
What are the values for "board.SCL" and "board.SDA"
do they match your hardware of pins 28 and 27?

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

My first guess would be that when you use "i2cdetect" it is using the correct pins for SCL and SDA, but when you use the line of code "i2c = board.I2C() # uses board.SCL and board.SDA"

then that code is using different pins. What are the values for "board.SCL" and "board.SDA" do they match your hardware of pins 28 and 27?

in my code, I connect the i2c variable to board.SCL_1 and board.SDA_1

i2c = board.I2C(board.SCL_1, board.SDA_1)

why? because if I connected it to board.SCL and board.SDA the error would be no I2C device at address: 0x69

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

My first guess would be that when you use "i2cdetect" it is using the correct pins for SCL and SDA, but when you use the line of code "i2c = board.I2C() # uses board.SCL and board.SDA"

then that code is using different pins. What are the values for "board.SCL" and "board.SDA" do they match your hardware of pins 28 and 27?

wait do we have to follow hardware pin to connect the i2c cable? isn't it enough to connect it to the i2c pin on jetson nano?

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

Do I get Failed to find MPU6050 - check your wiring because the MPU broken?

from adafruit_circuitpython_mpu6050.

jposada202020 avatar jposada202020 commented on August 26, 2024

@Aldhanekaa. Hello :). It seems to me that this is more a question than a problem with the library. I have just checked the sensor, and it worked fine using the RP2040 feather. I would recommend following this guide
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/i2c-sensors-and-devices.
I have no knowledge of how the Jetson works, but you could take a look here https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano/i2c-sensors-devices.
Another suggestion would be to contact the sensor manufacturer to see if they have any more information.

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

@Aldhanekaa. Hello :). It seems to me that this is more a question than a problem with the library. I have just checked the sensor, and it worked fine using the RP2040 feather. I would recommend following this guide https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/i2c-sensors-and-devices. I have no knowledge of how the Jetson works, but you could take a look here https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano/i2c-sensors-devices. Another suggestion would be to contact the sensor manufacturer to see if they have any more information.

I follow this tutorial https://automaticaddison.com/visualize-imu-data-using-the-mpu6050-ros-and-jetson-nano/ to run MPU6050 on jetson nano, I've followed all of the steps though even when after I changed the i2c to pin 5,3 (SCL,SDA) it still unable to find the MPU. But, is it possible this occur because my MPU broken? I think I do so because I once scratched the board with screwdriver because the soldier tin from different pin was joined (I want to split it) (I'm newbie in soldering :D ), however if it really broken why the LED still turned on and i2cdetect still able to detect the address?.

from adafruit_circuitpython_mpu6050.

jposada202020 avatar jposada202020 commented on August 26, 2024

@Aldhanekaa the library is looking for a sensor in the 0x68 address, so you could change the value here to 0x69, so it could read your sensor :). Hope that helps. Good luck!

_MPU6050_DEVICE_ID = 0x68 # The correct MPU6050_WHO_AM_I value

Regarding, the broken sensor, light comes from power, and not directly from the sensor, so it does not indicate that the sensor is working or not. No worries, soldering is an art :)
If you have any other question, please come by the adafruit discord channel. Maybe some people could help you :)

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

@Aldhanekaa the library is looking for a sensor in the 0x68 address, so you could change the value here to 0x69, so it could read your sensor :). Hope that helps. Good luck!

_MPU6050_DEVICE_ID = 0x68 # The correct MPU6050_WHO_AM_I value

Regarding, the broken sensor, light comes from power, and not directly from the sensor, so it does not indicate that the sensor is working or not. No worries, soldering is an art :) If you have any other question, please come by the adafruit discord channel. Maybe some people could help you :)

Hm still returns an error cant find MPU.

I've changed the library python script as you suggest, however it seems like the error occurred because it tries to check.

    def __init__(self, i2c_bus: I2C, address: int = _MPU6050_DEFAULT_ADDRESS) -> None:
        self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)

        print(f"{self._device_id}  {_MPU6050_DEVICE_ID}")

        if self._device_id != _MPU6050_DEVICE_ID:
            raise RuntimeError("Failed to find MPU6050 - check your wiring!")

and it prints 152 105, why does the device_id returns 152? I already changed _MPU6050_DEVICE_ID to 0x69

from adafruit_circuitpython_mpu6050.

tekktrik avatar tekktrik commented on August 26, 2024

The _device_id get the response of asking the device to respond to a specific I2C command with it's own address. So since it doesn't match the I2C address you provided, it doesn't seem to be communicating with it. Is the response consistently 152, or does it change?

from adafruit_circuitpython_mpu6050.

Aldhanekaa avatar Aldhanekaa commented on August 26, 2024

The _device_id get the response of asking the device to respond to a specific I2C command with it's own address. So since it doesn't match the I2C address you provided, it doesn't seem to be communicating with it. Is the response consistently 152, or does it change?

The response consistently 152.

from adafruit_circuitpython_mpu6050.

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.