My RPi runs Arduino to compile and flash sketches and the bootloader. With this setup no separate PC/Mac is needed. Exactly the same could be achieved (faster) using a PC/Mac for all the Arduino compilation and flashing activities – just skip the steps and execute on PC/Mac instead.
Headless Raspberry Pi model B with wired Ethernet
I'm connecting a monitor only for first time boot to get the IP address and then connect via Putty/xRDP
Tutorials for this task are available on the internet (download, copy to SD)
(adjust to your needs - here: RPi-IP: 10.0.1.5 / Router-IP: 10.0.1.1 / password: test / timezone: Europe,Berlin / hostname: mysensors)
#iface eth0 inet dhcp
iface eth0 inet static
address 10.0.1.5
netmask 255.255.255.0
gateway 10.0.1.1
nameserver 10.0.1.1
test
Europe / Berlin
mysensors
16
Optional… my RPi is headless and I use xRDP to connect from a Windows PC to run a graphical UI if needed (e.g. for Arduino IDE)
NODE_JS_HOME="/opt/node"
PATH="$PATH:$NODE_JS_HOME/bin"
export PATH
const fwHexFiles = [ ];
Arduino GND <-> Raspberry Pi GND (pin 6)
Arduino RX <-> Raspberry Pi TX (pin 8)
Arduino TX <-> Raspberry Pi RX (pin 10)
Arduino RESET <-> Raspberry Pi GPIO22 (pin 15)
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
console=ttyAMA0,115200
//const gwType = 'Ethernet';
//const gwAddress = '10.0.1.99';
//const gwPort = 9999;
const gwType = 'Serial';
const gwPort = '/dev/ttyAMA0';
const gwBaud = 115200;
//#define DEBUG
#define IP_PORT 9999
IPAddress myIp (10, 0, 1, 99);
const gwAddress = '10.0.1.99';
ISP_PORT = /dev/ttyUSB0
ISP_SPEED = 115200
ISP_PROTOCOL = stk500v2
ISP_MCU = m328p
const fwHexFiles = [ 'DallasTemperatureSensor.cpp.hex' ];
const fwDefaultType = 0;