2

Just to preface I am not that great at coding or anything and I am currently building sensors off of Oregon State University's Smart Rock sensor code, so the code I am being used is not mine. I am currently operating off their 2.5 and 2.5.1 Firmware as the code and every piece of the device works properly except for initializing an SD card, which continuously gives me the error of:

[Factory] Creating: SD
[SD] Initialize failed
[Device] Cannot add inactive module

I have attempted this in many different boards with different SD cards and the issue remains the same, so I am inclined to think the issue is within the firmware. Is there anyone who could potentially guide me in the right direction on this or determine where the issue is coming from. I will respond quickly. I am using a Feather m0 Adafruit board and a Hypnos V3.1 board. Here is the serial monitor report when running this code, just to add, I am only seeking to fix the SD card issues:

Initialized Serial!


= = = = = Parse Config = = = = =

Config Pretty Version:
{
  "general": {
    "name": "Device",
    "instance": 1
  },
  "components": [
    {
      "name": "Analog",
      "params": [
        8,
        12,
        true,
        false,
        true,
        false,
        false,
        false,
        5,
        0,
        4,
        0,
        0,
        0
      ]
    },
    {
      "name": "SD",
      "params": [
        true,
        1000,
        10,
        "data",
        true
      ]
    },
    {
      "name": "DS3231",
      "params": [
        11,
        true,
        true
      ]
    },
    {
      "name": "Interrupt_Manager",
      "params": "default"
    },
    {
      "name": "Sleep_Manager",
      "params": [
        true,
        false,
        1
      ]
    },
    {
      "name": "MS5803",
      "params": [
        119
      ]
    }
  ]
}
SIZE: 949
= = = = = Generate Objects = = = = =

[Factory] Creating: Analog
[Device] Adding Module: Analog
[Factory] Creating: SD
[SD] Initialize failed
[Device] Cannot add inactive module
[Factory] Creating: DS3231
[DS3231] Current Time (before possible reset)
[DS3231] Time: 2021/7/21 23:42:44
[DS3231] Time: 2021/7/21 23:42:44
[DS3231] Clearing DS3231 alarms
[Device] Adding Module: DS3231
[Device] Adding Module: InterruptManager
[Factory] Creating: Sleep_Manager
[Device] Adding Module: SleepManager
[Factory] Creating: MS5803
Oversampling setting: 512
C0 = 0
C1 = 0
C2 = 0
C3 = 0
C4 = 0
C5 = 0
C6 = 0
C7 = 0
p_crc: 0
n_crc: 0
[MS5803_0] Initialize failed
[Device] Adding Module: MS5803_0
= = = = = = = = = = = = = = = = =

[Device] Config:
    Device Name         : Device
    Instance Number     : 1
    Device Type         : Node
    Interval            : 1000
[Device] Modules:
    Others
        [+] InterruptManager
        [+] SleepManager
    Sensors
        [+] Analog
        [+] MS5803_0
    RTCs
        [+] DS3231
[InterruptManager] Registering ISR on pin 12 to be triggered on 0 and is immediate

 ** Setup Complete ** 
[Device] Json:
{
  "type": "data",
  "id": {
    "name": "Device",
    "instance": 1
  },
  "contents": [
    {
      "module": "Packet",
      "data": {
        "Number": 1
      }
    },
    {
      "module": "Analog",
      "data": {
        "Vbat": 0.012891,
        "EC[0]": 357.7055,
        "turbidity[2]": 2471
      }
    },
    {
      "module": "MS5803_0",
      "data": {
        "pressure": 0,
        "temp": 20
      }
    },
    {
      "module": "LocalTime",
      "data": {
        "Date": "2021/7/21",
        "Time": "15:42:44",
        "TimeZone": "PST"
      }
    }
  ],
  "timestamp": {
    "date": "2021/7/21",
    "time": "23:42:44"
  }
}

Any help would be appreciated! I'm sorry if the formatting is wonky I'm very new to this.

New contributor
Bryce K is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
4
  • Guessing, by any chance, are you using SDCards formatted by a Microsoft machine? Try a new from the factory SDCard which is likely formatted traditionally with partition tables. For what ever reason, Microsoft may have left that off their list of important things to do. – st2000 Jul 22 at 12:27
  • Also you might look here where several people with different problems are discussing SDCard Arduino issues. – st2000 Jul 22 at 12:33
  • This "Cannot add inactive module" has me stumped. Make sure all you software is up to date including any supporting software like Arduino libraries and board support. – st2000 Jul 22 at 12:45
  • Adding on to the first comment, Make sure that your SD card is not a high capacity version or one that is formatted(use as comes from factory) these factors may be causing you trouble. If you did format it, format it again with a different file allocation table – Coder9390 Jul 23 at 0:53

Your Answer

Bryce K is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.