MRF24J40 con ARDUINO

Hola a todo el mundo!

Soy un estudiante de ingeniería eléctrica que por causas del destino se ve abocado a hacer el PFC sobre lo siguiente:

Tengo unos sensores digitales DS18S20 que he de colocar en la cubierta del edificio de la universidad, y usando un par de MRF24J40ma debo de enviar los datos tomados a mi ordenador. Para ello uso la placa Arduino UNO.

Ando muy perdido al programarlo; he conseguido programar la placa para poder leer las medidas de los sensores mediante conexion USB:

#include <OneWire.h>
#define numsens 2
OneWire  ds(2);  // on pin 2


void setup(void) {
  Serial.begin(9600);
 
}

void loop(void) {
 
  
  byte i;
  byte present = 0;
  byte type_s;
  byte data[12];
  byte addr[8];
  float celsius;
  
  if ( !ds.search(addr)) {
    ds.reset_search();
    Serial.print("\n");
    delay(50);
    return;
  }
  

  if (OneWire::crc8(addr, 7) != addr[7]) {
      Serial.println("CRC is not valid!");
      return;
  }

 
  // the first ROM byte indicates which chip
  switch (addr[0]) {
    case 0x10:
      type_s = 1;
      break;
      default:
      Serial.println("Device is not a DS18x20 family device.");
      return;
  } 

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1);         // start conversion, with parasite power on at the end
  
  delay(100);     // 3.3V to Power Pin
  // we might do a ds.depower() here, but the reset will take care of it.
  
  present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE);         // Read Scratchpad


  for ( i = 0; i < 9; i++) {           // we need 9 bytes
    data[i] = ds.read();
    
  }

   // convert the data to actual temperature

  unsigned int raw = (data[1] << 8) | data[0];
  if (type_s) {
    raw = raw << 3; // 9 bit resolution default
    if (data[7] == 0x10) {
      // count remain gives full 12 bit resolution
      raw = (raw & 0xFFF0) + 12 - data[6];
    }
  } else {
    byte cfg = (data[4] & 0x60);
    if (cfg == 0x00) raw = raw << 3;  // 9 bit resolution, 93.75 ms
    else if (cfg == 0x20) raw = raw << 2; // 10 bit res, 187.5 ms
    else if (cfg == 0x40) raw = raw << 1; // 11 bit res, 375 ms
    // default is 12 bit resolution, 750 ms conversion time
  }
  celsius = (float)raw / 16.0;
   Serial.print(celsius);
   Serial.print(";");

}

Pero ahora necesito conseguir enviar los datos usando el MRF24J40MA para lo que he conseguido este modelo:

/**
* Example code for using a microchip mrf24j40 module to send simple packets
*
* Requirements: 3 pins for spi, 3 pins for reset, chip select and interrupt
* notifications
* This example file is considered to be in the public domain
* Originally written by Karl Palsson, karlp@tweak.net.au, March 2011
*/
#include <SPI.h>
#include <mrf24j.h>

const int pin_reset = 6;
const int pin_cs = 10; // default CS pin on ATmega8/168/328
const int pin_interrupt = 2; // default interrupt pin on ATmega8/168/328

Mrf24j mrf(pin_reset, pin_cs, pin_interrupt);

long last_time;
long tx_interval = 1000;

void setup() {
  Serial.begin(9600);
  
  mrf.reset();
  mrf.init();
  
  mrf.set_pan(0xcafe);
  // This is _our_ address
  mrf.address16_write(0x6001);
  
  // uncomment if you want to enable PA/LNA external control
  //mrf.set_palna(true);

  attachInterrupt(0, interrupt_routine, CHANGE); // interrupt 0 equivalent to pin 2(INT0) on ATmega8/168/328
  last_time = millis();
  interrupts();
}

void interrupt_routine() {
    mrf.interrupt_handler(); // mrf24 object interrupt routine
}

void loop() {
    mrf.check_flags(&handle_rx, &handle_tx);
}

void handle_rx() {
    // data to receive, nothing to do
}

void handle_tx() {
    if (mrf.get_txinfo()->tx_ok) {
        Serial.println("TX went ok, got ack");
    } else {
        Serial.print("TX failed after ");Serial.print(mrf.get_txinfo()->retries);Serial.println(" retries\n");
    }
}

Lo he sacado de aquí: GitHub - karlp/Mrf24j40-arduino-library: arduino driver for the mrf24j40 802.15.4 modules

¿Alguno de vosotros me podría echar una mano?

Otra duda que tengo es la siguiente: ya he conectado el transceiver MRF24J40 a la placa arduino, pero mi profesor me ha dicho que no necesito otra placa arduino para conectar el receiver al PC... ¿Cómo conecto el receiver entonces?

Perdonen mi ignorancia sobre el tema :~

Otra duda que tengo es la siguiente: ya he conectado el transceiver MRF24J40 a la placa arduino, pero mi profesor me ha dicho que no necesito otra placa arduino para conectar el receiver al PC... ¿Cómo conecto el receiver entonces?

Conectar un dispositivo SPI directamente a un PC? Pues creo que no se puede, aunque lo mismo con el puerto paralelo si se puede.