Code:
http://www.stargazing.net/kepler/altaz.html
can help youafter that and understand how this work can drive for this
Code:
http://www.jgiesen.de/astro/astroJS/siderealClock/
instead calculate everything manually.I doing the same, but now i have the problem of down't know what to do with what I received.
I'm work with a digital compass and accelerometer