Go Down

Topic: i want to replay the sound (Read 1 time) previous topic - next topic

Nick Gammon

What about the code tags? And please use the auto-format tool in the IDE. This sort of stuff is impossible to follow:

Code: [Select]

}
}
}
}
}

#endif
}


Quote

sorry what you mean by tage ??


Do you mean "tags"? Read this: How to use this forum

There is a pretty clear screen-shot showing what I mean.

mostafa_zied

Code: [Select]

#include <PN532.h>
#include <SPI.h>
#include <SimpleSDAudio.h>
#define PN532_CS 10
PN532 nfc(PN532_CS);
#define NFC_DEMO_DEBUG 1
void setup() {
#ifdef NFC_DEMO_DEBUG
#endif
nfc.begin();
uint32_t versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
#ifdef NFC_DEMO_DEBUG

#endif
while (1); // halt
}
#ifdef NFC_DEMO_DEBUG

#endif
nfc.SAMConfig();

}
void loop(void)
{

uint32_t id;
id = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A);

if (id != 0)
{
#ifdef NFC_DEMO_DEBUG
Serial.print("Read card #");
Serial.println(id);
if(id==4251492471)
{
if (SdPlay.init(SSDA_MODE_FULLRATE | SSDA_MODE_MONO))
{
if(SdPlay.setFile("12.afm"))
{
SdPlay.play();
while(!SdPlay.isStopped())
{
SdPlay.worker();

}
}
}
}
}

#endif
}

mostafa_zied

thanx ........ this is the code

Nick Gammon


mostafa_zied


Go Up