I2C Usage
- Use the I2C interface on the 40PIN of the host computer
- This tutorial uses the FLY-PI V2 and LM75's I2C sensor connected to 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!!!
Wiring and Detection
- This tutorial uses PI V2 as a reference

- After connecting to the FLY host computer via SSH, enter the following command to get output like below
- If using
I2C0, replace the2in the command below with0
sudo i2cdetect -y -r 2
- Please note that under normal circumstances, pressing Enter will immediately display content like above along with an address
- Please note the address is random
- Please note that if the wiring is incorrect, the wires are reversed, the configuration is not enabled, or the module is damaged, the output will not be normal
- The address needs to be converted from hexadecimal to decimal and then entered after
i2c_address:in the configuration - You can search online for a hexadecimal converter using a browser 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...