Error 'pin' not declared in scope - dfplayer_mini_mp3, #define player pin

Hi
I am trying to set up a sound as part of a result of other inputs. I have copied the code from a more complex program and deleted or commented out the wifi etc.
I have figured out most of my issues so far by searching this forum, but nothing comes up with detailed search and can't spot anything relevant on wider searches, even though I am sure this is quite simple. also searching for D3 in original code only shows this line.

code as follows
error is 'D3' was not declared in the scope

#include <DFPlayer_Mini_Mp3.h>
#include <Wire.h>
#include <MMA8453_n0m1.h>
#include <SoftwareSerial.h>

#define PLAYER_PIN      D3
#define LOCK_PIN        D7


int side = -1;  // side of the cube


bool winner = false;

MMA8453_n0m1 accel;

int sideOld=-1;   //502134
int codeOk[6]={4,3,2,1,5,0};        // correct combination
int codeIn[6]={-1,-1,-1,-1,-1,-1};
byte sound = 28;                    // volume level 


SoftwareSerial mySerial(99, PLAYER_PIN); // RX, TX


void setup()

any guidance appreciated

@p54hotter, your topic has been moved to amore suitable location on the forum. Installation and Troubleshooting is not for problems with your project; see About the Installation & Troubleshooting category.

Which board? On Arduinos, digital pins are refered to by just the number. I'm not sure about ESP or STM boards.

how did you go with wth 3 instead of D3 etc.

thankyou

sorry - trying to get my head around so many aspects of this Arduino thing - hopefully next question is on correct board.

yes that works - thought it would be obvious when you know. I guess the code I am starting from is not for Arduino as it says!

yes that works
oddly the D7 doesn't show an error? but have changed.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.