Raspberry Pi: How to Run a Program on Boot
Arduino has the advantage of being super simple and dumb and just running one program at boot. If you want your rPi to behave similarly, like an appliance (plug it in and go) then you'll need to do this:
sudo vi /etc/rc.local
Assuming your program/script is called MYSCRIPT in this example, all you gotta do is...
Edit the /etc/rc.local script, adding an invocation of your script before the "exit 0"
printf "Running MYSCRIPT now!" sudo /home/pi/MYSCRIPT & exit 0
(Use the ampersand to background the process if your program is blocking for a while -- e.g. a server)