Skip to main content

I2C Usage

  • Use the 40PIN I2C interface of the host computer
  • This tutorial uses the FLY-PI V2 LM75 I2C sensor with I2C2 as an example!!!
  • Please note that I2C1 is already occupied by other devices and cannot be used!!!
  • Please ensure the wiring is firm and stable!!!

Enable I2C through FLY Tools

  • Locate Overlays and select i2c2 and i2c0 from the options
  • Please note that I2C1 is already occupied by other devices and cannot be used!!!
  • Save and restart

Wiring and Device Detection

  • After connecting to the FLY host via SSH, input the following command to get the output shown below
  • If using I2C0, replace 2 in the command below with 0
sudo i2cdetect -y -r 2
  • Please note that under normal circumstances, pressing Enter will immediately display the content above along with an address
  • Please note that the address is random
  • If the wiring is incorrect, reversed, configuration not enabled, or the module is damaged, the output will be abnormal
  • The address needs to be converted from hexadecimal to decimal before entering it after i2c_address: in the configuration
  • You can use a browser to search for an online base converter to perform the conversion

Configuration

[mcu host]
serial: /tmp/klipper_host_mcu

[temperature_sensor my_sensor]
sensor_type: LM75
i2c_address:72
# # Default is 72 (0x48). Normal range is 72-79 (0x48-0x4F) and the 3
# # low bits of the address are configured via pins on the chip
# # (usually with jumpers or hard wired).
i2c_mcu:host
i2c_bus:i2c.2
# i2c_software_scl

Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
Loading...