/*
RF02 TX sample for Arduino
in arduino version 022
tested with MLAB modules with ATmega 328 at 16MHz
see RF02 library for a Band and Frequency
*/
//connections RF01: (RX)
// RF01 SDI, arduino 13, ATmega PB5, cannot be changed
// RF01 SCK, arduino 12, ATmega PB4, cannot be changed
// RF01 nSEL, arduino 11, ATmega PB3, cannot be changed
// RF01 SDO, arduino 10, ATmega PB2, cannot be changed
// RF01 niRQ, arduino 02, ATmega PD2, cannot be changed
// RF01 nFFS: 1-10k Pullup too Vcc
// receiving words with RF01
#include <RF01.h>
void setup()
{
Serial.begin(9600);
Serial.println("\nRFM01 init");
delay(250);
rf01_prepAll();
Serial.println("done");
}
void loop()
{
int n;
char* buf = (char*) _rx_buffer;
rf01_rxdata(_rx_buffer, 10);
buf[11]=0;
Serial.println(buf);
for(n=0;n<32;n++) {Serial.print(buf[n], HEX); Serial.print(' ');}
Serial.println();
}