LowPowerLab Forum

Hardware support => Moteino => Topic started by: bgreene on March 18, 2015, 10:46:19 AM

Title: startup failure - solution
Post by: bgreene on March 18, 2015, 10:46:19 AM
This might help somebody.
I had a problem after reboot or uploading a sketch whereby the rfm69 often wouldn't function. I then put a loop in the setup() function which polled rfm69.cansend once a second in the hope that this would solve it but with no luck. The solution is below
  radio.initialize(config.frequency,config.nodeid,config.networkid);
  radio.setHighPower(); //uncomment only for RFM69HW!
  radio.encrypt(ENCRYPTKEY);
  radio.promiscuous(false); // set to true to sniff ALL packets on the same network
  // the next line solved the problem completely
  if (radio.receiveDone()){   if (radio.ACK_REQUESTED)  radio.sendACK();  }
Bill