Firmware upload

Do we need to upload the program code to arduino and Pi?

Yes, please see the FarmBot OS installation instructions which will install the firmware for both boards.