// digipot #define DATAOUT 11//MOSI #define DATAIN 12//MISO - not used, but part of builtin SPI #define SPICLOCK 13//sck #define SLAVESELECT 10//ss byte pot=0; byte resistance=0; //Accelerometer Sensor //Matt @ http://antipastohw.blogspot.com/ //Author of original code base: Marcos Yarza, Malmo University - Sweden, http://www.0j0.org //Pin definitions #define xaccPin 8 #define yaccPin 7 //Global variables long xacc = 0; long yacc = 0; int x = 0; int y = 0; int a = 0; int b = 0; int c = 0; int d = 0; // digipot functions char spi_transfer(volatile char data) { SPDR = data; // Start the transmission while (!(SPSR & (1<