rfm9x, M0 feather

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
cdrum2022
 
Posts: 2
Joined: Mon Oct 10, 2022 9:14 pm

rfm9x, M0 feather

Post by cdrum2022 »

Hi Folks,

Hoping someone can help me with what is a frustrating, and probably a simple problem. I have a Feather M0, with an integrated RFM9x Lora board that I'm trying to connect to a Pi Zero with an Adafruit RFM9x bonnet. I have a simple example program that I've successfully used to pass messages from the Feather to the Pi. However, as soon as I disconnect from my computer, and power up from a wall-wart it seems to no-longer work. I believe I've isolated the problem to this section of code:

Code: Select all

void setup() 
{
  pinMode(RFM95_RST, OUTPUT);
  digitalWrite(RFM95_RST, HIGH);

  Serial.begin(115200);
  while (!Serial) {
    digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(250);                       // wait for a 1/4 second
    digitalWrite(LED_BUILTIN, LOW); 
    delay(1);
  }
I've seen examples that suggest you need to jump the I/O pin to D6. I've done this with no change. So what am I doing wrong?

Thanks,
Dw

User avatar
alpierce
 
Posts: 208
Joined: Mon May 13, 2013 2:44 am

Re: rfm9x, M0 feather

Post by alpierce »

The while !serial is waiting for a serial connection that only happens if the usb is connected. I usually replace that section with about a 2 second delay. That will give enough time to establish a connection when usb is connected and simply delay that long after power up from the wall wart.

User avatar
adafruit_support_carter
 
Posts: 29483
Joined: Tue Nov 29, 2016 2:45 pm

Re: rfm9x, M0 feather

Post by adafruit_support_carter »

Yep. Common trap. Stuck in the while !Serial loop forever, so rest of sketch never runs. Should see the blinking LED forever though?

User avatar
cdrum2022
 
Posts: 2
Joined: Mon Oct 10, 2022 9:14 pm

Re: rfm9x, M0 feather

Post by cdrum2022 »

Thank you, thank you!

Yes, code blinks forever (my attempt to isolate the problem). I'll try the 2-second delay suggestion. Again, thank you very much!!

Dw

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”