changing from UNO to Mega - head of robot going haywire

thanks robin for your response.

tried once to post but the photos files were too large.

yes you are right - in both uno and mega - int is 16 bit.

haywire - going really fast left nd right (clock and anti) on mega
and from 180 deg in uno to sometimes 360 deg in mega.

sorry not good at sketches - wiring as per code.

sunil v