Using an accelerometer as a geophone to conduct a seismic survey
Accelerometers have already been used for acquiring seismic data in a lot of studies: see this review, and references therein.

As for the code part, there is a Python framework for seismology: ObsPy.