Hi guys !
I encountered some problems with TinyDuinos. It's a platform based on arduino and ATMega328P. You can find it here : https://www.tiny-circuits.com/
Si I want to connect a PN532 from adafruit (Adafruit PN532 NFC/RFID Controller Shield for Arduino + Extras : ID 789 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits) in SPI and a SD card from Tiny-Circuits (https://www.tiny-circuits.com/tiny-shield-micro-sd.html) which is already in SPI on pin 10.
I put the SS pin of the NFC board on IO4. When i use the NFC board or the SD Card separately it works fine.
However, when i try to initialize both, the SD Card failed and the NFC board too.
I suppose it's because SD use pins that NFC need or inverse.
Here is my code, very simple sketch :
#include "PN532_SPI.h"
#include "PN532.h"
#include "NfcAdapter.h"
#include <SPI.h>
#include <SD.h>
/** NFC ATTRIBUTES */
PN532_SPI interface(SPI, 4); // create a PN532 SPI interface with the SPI CS terminal located at digital pin 10
NfcAdapter nfc = NfcAdapter(interface); // create an NFC adapter object
void setup() {
Serial.begin(9600);
if (!SD.begin(10)) {
Serial.println(F("failed"));
}
else {
Serial.println(F("success"));
}
nfc.begin();
}
void loop() {
// put your main code here, to run repeatedly:
}
I use this libraries :
NFC : Seed studio
SD : Adafruit SD
Thank you very much !
Maxouille