http://www.stargazing.net/kepler/altaz.htmlcan help you
after that and understand how this work can drive for this
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