Finding the direction of the robot

Dear friends,

We are working on a project which is based on designing a bot to navigate in our home. In that we are in need of finding the direction in which the bot is facing. Is there any sensors that can be interfaced with arduino that could help us find the direction that the bot faces?

Also in case of VHDL programming we have a function called "always@()" which will be executed every time if there is a change in the variable inside the braces. Is there any such function in arduino?

A compass might be an option.