RS-485 is typically used to cover any non-trivial distance and add noise immunity.
Some other possibilities...
• CANBUS
• Ethernet
• 1-Wire
• XBee
• WiFi
• 433MHz radio (and its ilk)
I believe there are I2C bus extenders available that will cover 40 meters.