In 1348 , Giovanni Dondi built the first known clock driven mechanism which displays the ecliptical position of Moon , Sun , Mercury , Venus , Mars , Jupiter and Saturn according to the complicated Ptolemaic planetary theories .