Before looking at question 1, I'd expand on exactly what you want the robot to do. Is it moving, is it stationary, list out all of the tasks you want it to do.
Regarding the garden defense part, if it's just turning on bright lights to scare away any animals, that'd be a relatively simple task. If on the other hand you want it to physically chase the animals away, that'd be a whole other task.