Man tells judge he was off medication at time of robbery