Back to the Gcode Dictionary
M260: i2c Send and/or request Data
Send and/or receive data over the i2c bus. Supported in RepRapFirmware 1.21 and later.
- Ann I2C address
- Bnn:nn:nn... Bytes to send (optional in firmware 2.02 and later)
- Rnn Number of bytes to receive (optional) - firmware 2.02 and later only
- M260 A5 B65 ; Send 'A' to address 5 now
- M260 A"x7F" B65 ; Send 'A' to address 7F (hex)
- M260 A0 B82:101:112:82:97:112 ; Send 'RepRap' to address 0
- M260 A"x71" B19 R2 ; send 19 to address 71 (hex) and read 2 bytes back
Hex addresses are only supported in firmware 2.02 and later.