added motor position mode to cpp demo program