Answers.Body: <p>Yes, Mindstorms is incredibly hackable. You can use whatever 3rd-party analog, I2C, or UART devices you want with the EV3 brick. According to the <a href="https://www.mikrocontroller.net/attachment/338591/hardware_developer_kit.pdf" rel="nofollow noreferrer">hardware developer kit documentation</a>:</p>
  
  <blockquote>
    <p>The EV3 platform supports the same level of I2C communication as MINDSTORMS NXT. This means that
    system support a maximum of 9600 bit/s and maximum 32 bytes communication buffers. All I2C
    communication is running within software drivers. External devices are required to include pull-up
    resistors on both pin 5 and 6 on 82K ohm. If multiple sensors are used on the same bus the total
    impedance needs to be adjusted accordingly.</p>
  </blockquote>
  
  <p>Obviously, the standard Lego programming software will not be able to utilize custom devices, but pretty much any 3rd-party firmware will allow sending custom I2C read/writes.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-22T14:02:37.307Z
Answers.LastActivityDate: 2018-10-22T14:02:37.307Z
Answers.UserDisplayName: MindS1
Answers.Body: <p>As MindS1 mentioned, I2C on the EV3 is a bit limited, so it really depends on what device you are connecting. There isn't really a way to tell if a device will work or not besides just trying it out. Even if it "meets the specs", there can still be timing issues that cause problems.</p>
  
  <p>Dexter Industries has a <a href="https://www.dexterindustries.com/howto/connecting-ev3-arduino/" rel="nofollow noreferrer">nice blog post</a> about connecting EV3 to an Arduino via I2C. This includes a block they created for the official EV3 programming software that does generic I2C communications. One limitation is that although you can read up to 32 bits at a time, you can only write at most one byte at a time (this is a limitation of the EV3 firmware, not the Dexter Industries block). So if a device requires longer write messages it definitely won't work. Otherwise, as already mentioned, you will just have to try it and see what happens.</p>
  
  <p>The <a href="http://ev3dev.org" rel="nofollow noreferrer">ev3dev</a> 3rd-party OS for EV3 has more robust I2C handling since is uses the standard Linux I2C interface. For example, you can write a program in Python <a href="https://github.com/ev3dev/ev3dev/issues/1007#issuecomment-344684487" rel="nofollow noreferrer">like this</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-22T17:08:51.357Z
Answers.LastActivityDate: 2018-10-22T17:08:51.357Z
Answers.UserDisplayName: David Lechner
Body: <p>The only detail I've found so far is that the pull-up resistor should be 82k ohm. I'm wondering If I could just get something like this <a href="https://www.adafruit.com/product/2809?gclid=CjwKCAjwx7DeBRBJEiwA9MeX_HyCh8ZtTl6AoMw7PFnTufeo9q5BzX_bNvNc9-q1AC9_z_gSRSX8PBoCu0kQAvD_BwE" rel="nofollow noreferrer">Adafruit Gyro/Accelerometer</a>
  and just hook it up to the SDA and SCL pins of the EV3 and use it like the Lego brand sensor with minimal modification.</p>
  
Tags: <ev3><mindstorms><3rd-party>
Title: Is the EV3 compatible with a 3rd party I2C gyroscope?
UserDisplayName: griffin175
ThreadText: # Is the EV3 compatible with a 3rd party I2C gyroscope?
  
  (Asked by: username_0 on 2018-10-21)
  
  The only detail I've found so far is that the pull-up resistor should be 82k ohm. I'm wondering If I could just get something like this [Adafruit Gyro/Accelerometer](https://www.adafruit.com/product/2809?gclid=CjwKCAjwx7DeBRBJEiwA9MeX_HyCh8ZtTl6AoMw7PFnTufeo9q5BzX_bNvNc9-q1AC9_z_gSRSX8PBoCu0kQAvD_BwE)
  and just hook it up to the SDA and SCL pins of the EV3 and use it like the Lego brand sensor with minimal modification.
  
  **Tags:** ev3, mindstorms, 3rd-party
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-10-22. Score: 1
  
  Yes, Mindstorms is incredibly hackable. You can use whatever 3rd-party analog, I2C, or UART devices you want with the EV3 brick. According to the [hardware developer kit documentation](https://www.mikrocontroller.net/attachment/338591/hardware_developer_kit.pdf):
  
  > The EV3 platform supports the same level of I2C communication as MINDSTORMS NXT. This means that
  > system support a maximum of 9600 bit/s and maximum 32 bytes communication buffers. All I2C
  > communication is running within software drivers. External devices are required to include pull-up
  > resistors on both pin 5 and 6 on 82K ohm. If multiple sensors are used on the same bus the total
  > impedance needs to be adjusted accordingly.
  
  Obviously, the standard Lego programming software will not be able to utilize custom devices, but pretty much any 3rd-party firmware will allow sending custom I2C read/writes.
  
  
  ---
  
  ### Answer by username_2 on 2018-10-22. Score: 1
  
  As username_1 mentioned, I2C on the EV3 is a bit limited, so it really depends on what device you are connecting. There isn't really a way to tell if a device will work or not besides just trying it out. Even if it "meets the specs", there can still be timing issues that cause problems.
  
  Dexter Industries has a [nice blog post](https://www.dexterindustries.com/howto/connecting-ev3-arduino/) about connecting EV3 to an Arduino via I2C. This includes a block they created for the official EV3 programming software that does generic I2C communications. One limitation is that although you can read up to 32 bits at a time, you can only write at most one byte at a time (this is a limitation of the EV3 firmware, not the Dexter Industries block). So if a device requires longer write messages it definitely won't work. Otherwise, as already mentioned, you will just have to try it and see what happens.
  
  The [ev3dev](http://ev3dev.org) 3rd-party OS for EV3 has more robust I2C handling since is uses the standard Linux I2C interface. For example, you can write a program in Python [like this](https://github.com/ev3dev/ev3dev/issues/1007#issuecomment-344684487).
  
  
  ---
  
  