Hello sbright33,
here is the link to the library: skip.co.at/RFM70/RFM70.zip
unpack it to C:\Program Files (x86)\arduino-1.0\libraries\RFM70.
Pinout:
CE Pin 9
CSN Pin 10
SCK Pin 13
MISO Pin 12
MOSI Pin 11
IRQ Pin 8
and don't forget the 3.3 V stepdown converter!
Please ask me if you have any questions!
Example code (not all was tested):
#include "RFM70.h"
RFM70class RFM70;
byte RFM70_buf[MAX_PACKET_LEN]; //RFM70 data buffer
unsigned long RFMSendTime = 0; //next send time
int RFMSendSpeed=1000; //send packet every 1000 msec
void setup()
{
Serial.begin(57600);
Serial.println("Arduino Start");
RFM70.begin();
RFM70.Initialize();
RFMSendTime = millis();
}
void loop()
{
rfmTask(); //check for RFM70 event in polling mode
if (millis() > RFMSendTime) //send packet
{
RFMSendTime = millis() + RFMSendSpeed;
RFM70_buf[0]=0X41;
RFM70_buf[1]=0X42;
RFM70_buf[2]=0X43;
RFM70_buf[3]=0X44;
RFM70.Send_Packet(WR_TX_PLOAD,RFM70_buf,4);
Serial.println("Sending data");
}
}
void rfmTask() //RFM70 event handler
{
if (RFM70.RfmInterrupt())
{
if (RFM70.TxDataSentInterrupt())
{
Serial.println("Data sent OK");
RFM70.SwitchToRxMode();
}
if (RFM70.TxDataSentErrorInterrupt())
{
Serial.println("Data sent error");
RFM70.SwitchToRxMode();
}
if (RFM70.RxDataReadyInterrupt())
{
Serial.println("Data received: ");
byte rx_len = RFM70.Receive_Packet(RFM70_buf);
if (rx_len)
{
for(byte i=1;i<rx_len;i++)
{
Serial.print(i);
Serial.print("->");
Serial.println(RFM70_buf[i]);
}
}
}
}
}