Measure the angle of the turn on makeblock robot that based on Arduino Leonardo

How to measure the angle of the turn on makeblock robot that based on Arduino Leonardo like this: http://wiki.makeblock.cc/index.php?title=Me-Baseboard