This is very generic, not knowing how much you know and want to learn on your own. If not enough, ask more specific questions and I'll answer as best I can. I tried to write this to translate well into functions and basic commands.
start a file: gatherBerries.oc.lua make sure it starts with
local computer = require("computer") local robot = require("robot")
to have access to needed commands.
Some notes on what it was intended for, who wrote it and when, are nice to have.
--[[
Tinker's Construct OreBerry Gatherer v0.3
for OpenComputers v1.47
Written by Me on 2015Feb14
Requires: S