EDIT: solved. Perhaps the wires were loose? It seems to be sending constantly now.
I've been having trouble getting the RFM69 library to work with a sender/receiver demo. I've decided to just simplify things and at least get a sender working without ack. I chop the "Node.ino" example to this small set of lines:
// Get the RFM69 and SPIFlash library at: https://github.com/LowPowerLab/
#include <RFM69.h>
#include <SPI.h>
#define NODEID 2 //unique for each node on same network
#define NETWORKID 100 //the same on all nodes that talk to each other
#define GATEWAYID 1
//Match frequency to the hardware version of the radio on your Moteino (uncomment one):
//define FREQUENCY RF69_433MHZ
//#define FREQUENCY RF69_868MHZ
#define FREQUENCY RF69_915MHZ
#define ENCRYPTKEY "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
#define IS_RFM69HW //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ACK_TIME 30 // max # of ms to wait for an ack
#define SERIAL_BAUD 9600
char payload[] = "123 ABCDEFGHIJKLMNOPQRSTUVWXYZ";
RFM69 radio;
void setup() {
Serial.begin(SERIAL_BAUD);
radio.initialize(FREQUENCY,NODEID,NETWORKID);
#ifdef IS_RFM69HW
radio.setHighPower(); //uncomment only for RFM69HW!
#endif
radio.encrypt(ENCRYPTKEY);
char buff[50];
sprintf(buff, "\nTransmitting at %d Mhz...", FREQUENCY==RF69_433MHZ ? 433 : FREQUENCY==RF69_868MHZ ? 868 : 915);
Serial.println(buff);
}
long lastPeriod = -1;
void loop() {
Serial.println("in loop");
radio.send(GATEWAYID, payload, 8);
Serial.println("Send complete");
}
The output from the serial monitor is this:
Transmitting at 915 Mhz...
in loop
It looks like the send command never completes - like it's hanging on the send command. What might be causing this?
I have the demo gateway running at the same time as this node sketch, but it shouldn't matter right? I turn off ack?