code: function transmit(sensor)
  {
      // lets build up a packet and try loading it (8 bytes max).
      var myPayload = "01234567";
      console.log("Loading a packet of 8 numbers (0-7) into a TX buffer...");
      sensor.loadTXBuffer(sensorObj.MCP2515_TX_BUFFER0,
                          0, false, false, myPayload);
  
      // now lets try to transmit it
      console.log("Transmitting packet...");
      sensor.transmitBuffer(sensorObj.MCP2515_TX_BUFFER0, true);
  
      console.log("Transmit successful");
      console.log();
  }
docs: You should start the receiver example first.  The transmitter example will fail after about 5 seconds (timeout) of not being able to transmit a message.