Skip to content

PD3 Scope Error When Building for Daisy Seed Rev4 in PlatformIO #41

@jps723

Description

@jps723

This error presented when trying to upload any DaisyDuino example in PlatformIO for VSCode using a Daisy Seed Rev4.

.pio/libdeps/electrosmith_daisy/DaisyDuino/src/AudioClass.cpp: In member function 'AudioClass::BoardVersion AudioClass::BoardVersionCheck()':
.pio/libdeps/electrosmith_daisy/DaisyDuino/src/AudioClass.cpp:271:13: error: 'PD3' was not declared in this scope; did you mean 'D3'?

BoardVersionCheck() within AudioClass.cpp references 'PD3' which is defined within daisy_patch_sm.h. This is included in DaisyDuino.h but seems wrong since I'm not using a patch/submodule. I managed to work around this by hardcoding the rev4 as my board within AudioClass.cpp.

AudioClass::BoardVersion AudioClass::BoardVersionCheck()
{
  /** Version Checks:
   *  * Fall through is Daisy Seed v1 (aka Daisy Seed rev4)
   *  * PD3 tied to gnd is Daisy Seed v1.1 (aka Daisy Seed rev5)
   *  * PD4 tied to gnd reserved for future hardware
   */

  // pinMode(PD3, INPUT_PULLUP);

  // if (!digitalRead(PD3))
  // {
  //   return BoardVersion::DAISY_SEED_1_1;
  // }
  // else
  // {
  return BoardVersion::DAISY_SEED;
  //}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions