I know JavaScript is a terrible language to do this in, it's just a proof of concept, stfu.
#####From the command line
$: gitclone git://github.com/EnotionZ/node-rc.git#####Inside js file
varrc=require("./node-rc").init({pinRight: GPIO_HEADER_FOR_RIGHT_TURN,pinLeft: GPIO_HEADER_FOR_LEFT_TURN,pinBackward: GPIO_HEADER_FOR_DRIVING_BACKWARD,pinForward: GPIO_HEADER_FOR_DRIVING_FORWARD,// place code to fire when headers are readyready: function(){// drivingrc.drive("forward");rc.drive("backward");rc.stop();// steeringrc.turn("left");rc.turn("right");rc.straight();// shortcutsrc.drive("f");// drive forwardrc.drive("b");// drive backwardrc.drive();// stops drivingrc.turn("l");// turn leftrc.turn("r");// turn rightrc.turn();// straighten wheels// When done, unexport the headersrc.end(function(){// Fire callback once all headers exportprocess.exit();});}});