vibration sensing and transmit signal using xbee when exceeds set point

Can you send me program to sense and process vibration signal detected by Adxl 345 and transmit signal using Xbee S2 when exceeds set point.