Black Lives Matter - Action and Equality.
0

Computer Won't Recognize feather m0 rfm9x
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Computer Won't Recognize feather m0 rfm9x

by dsblock19 on Tue May 12, 2020 9:56 pm

The Arduino IDE, Mu, and Atom can all kinda see my M0 feather (lists ports, can open serial monitor). But It will not show up in file system, won't go into bootloader, and won't let me ctrl-c out of the code loop into the REPL. Won't show up on Linux, Windows, or Mac.

I've tried every trouble shooting solution online with no success.

dsblock19
 
Posts: 11
Joined: Tue Mar 19, 2019 5:57 pm

Re: Computer Won't Recognize feather m0 rfm9x

by dastels on Wed May 13, 2020 11:53 am

I'm curious... what code is on the Feather? Still, it's odd that double pressing reset doesn't mount FEATHERBOOT.

Dave

dastels
 
Posts: 2473
Joined: Tue Oct 20, 2015 3:22 pm

Re: Computer Won't Recognize feather m0 rfm9x

by dsblock19 on Wed May 13, 2020 1:54 pm

It was running a slightly modified version of the DHT22 RadioHead example. I could upload the blink sketch on fine. And when I doubletap the reset button the led starts to breathe like it is in featherboot, but no drive shows up on any computer.

Thanks so much!

Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include <RH_RF95.h>
#include "DHT.h"

#define DHTPIN 11

#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321

DHT dht(DHTPIN, DHTTYPE);

// for feather m0
#define RFM95_CS 8
#define RFM95_RST 4
#define RFM95_INT 3

// Change to 434.0 or other frequency, must match RX's freq!
#define RF95_FREQ 915.0

// Singleton instance of the radio driver
RH_RF95 rf95(RFM95_CS, RFM95_INT);

void setup()
{

  dht.begin();

  pinMode(RFM95_RST, OUTPUT);
  digitalWrite(RFM95_RST, HIGH);

  Serial.begin(115200);
  /*while (!Serial) {
    delay(1);
  }*/

  delay(100);

  Serial.println("Feather LoRa TX Test!");

  // manual reset
  digitalWrite(RFM95_RST, LOW);
  delay(10);
  digitalWrite(RFM95_RST, HIGH);
  delay(10);

  while (!rf95.init()) {
    Serial.println("LoRa radio init failed");
    Serial.println("Uncomment '#define SERIAL_DEBUG' in RH_RF95.cpp for detailed debug info");
    while (1);
  }
  Serial.println("LoRa radio init OK!");

  // Defaults after init are 434.0MHz, modulation GFSK_Rb250Fd250, +13dbM
  if (!rf95.setFrequency(RF95_FREQ)) {
    Serial.println("setFrequency failed");
    while (1);
  }
  Serial.print("Set Freq to: "); Serial.println(RF95_FREQ);

  // Defaults after init are 434.0MHz, 13dBm, Bw = 125 kHz, Cr = 4/5, Sf = 128chips/symbol, CRC on

  // The default transmitter power is 13dBm, using PA_BOOST.
  // If you are using RFM95/96/97/98 modules which uses the PA_BOOST transmitter pin, then
  // you can set transmitter powers from 5 to 23 dBm:
  rf95.setTxPower(23, false);
}

int16_t packetnum = 0;  // packet counter, we increment per xmission

void loop()
{
  delay(1000); // Wait 1 second between transmits, could also 'sleep' here!

  Serial.println("Transmitting..."); // Send a message to rf95_server

  delay(10);
  float t = float (dht.readTemperature());
  t = (t * 10);
  int tem = int (t);
  char temp = tem;
  char data[3] = {temp};
  itoa(temp, data, 10);
  Serial.print("Sending ");
  //data[3] = 0;
  Serial.println(t);

  rf95.send((uint8_t *)data, sizeof(data));

  Serial.println("Waiting for packet to complete...");
  delay(10);
  rf95.waitPacketSent();
  // Now wait for a reply
  uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
  uint8_t len = sizeof(buf);

  Serial.println("Waiting for reply...");
  if (rf95.waitAvailableTimeout(1000))
  {
    // Should be a reply message for us now
    if (rf95.recv(buf, &len))
   {
      Serial.print("Got reply: ");
      Serial.println((char*)buf);
      Serial.print("RSSI: ");
      Serial.println(rf95.lastRssi(), DEC);
    }
    else
    {
      Serial.println("Receive failed");
    }
  }
  else
  {
    Serial.println("No reply, is there a listener around?");
  }

}

dsblock19
 
Posts: 11
Joined: Tue Mar 19, 2019 5:57 pm

Re: Computer Won't Recognize feather m0 rfm9x

by dastels on Wed May 13, 2020 2:40 pm


dastels
 
Posts: 2473
Joined: Tue Oct 20, 2015 3:22 pm

Re: Computer Won't Recognize feather m0 rfm9x

by dsblock19 on Wed May 13, 2020 2:51 pm

Missed that part!

I bet it will fix it.

dsblock19
 
Posts: 11
Joined: Tue Mar 19, 2019 5:57 pm

Please be positive and constructive with your questions and comments.