Version 1.0.0.45 and later of Ohbot software allows an HMC5883 tilt sensor (supplied with the Ohbot sensor pack) to be connected to Ohbot. To enable the sensor save the following file to libraries\documents\Ohbot:
You can also save this example program to libraries\documents\Ohbot:
There's more information about using I2C sensors here: