Serial communication MKR WiFi 1010

Hi,

I am struggling with the implementation of the following NFC board - http://wiki.seeedstudio.com/Grove_NFC/ on a MKR WiFI 1010 board.

When I plug the NFC board in the SCL / SDA ports of the MKR board the USB serial goes mad and I cannot do anything or see any serial output in the monitor.

I have read a number of forum posts about creating a second software serial port etc. but I do not understand this and I am looking for any guidance.

Basically I would like to know how I can plug the NFC board into the MKR board so that it works. I get that I might have to unplug the NFC board every time I won't to put a new sketch on but at the moment I cannot get it to work at all.

Thanks in advanced for any help you can give.

Jaggie

JaggieGerhardt:
When I plug the NFC board in the SCL / SDA ports of the MKR board the USB serial goes mad and I cannot do anything or see any serial output in the monitor.

The NFC module is set for UART communications by default. You need to cut one solder jumper and create a new solder jumper to change it to I2C mode, as stated in the page you linked above. Did you do that?

JaggieGerhardt:
I have read a number of forum posts about creating a second software serial port etc. but I do not understand this and I am looking for any guidance.

Why do you want to do that? Is it because you want to use the NFC module in UART mode?

Hello. Please I need help. Am working on my project which is wireless notice board controlled by GSM. But when I load my code on to the arduino and text, the lcd displays the AT commands, the date and time and the sender’s number. I just want the lcd to disay just the content of the message I send.

clovis123:
Hello. Please I need help. Am working on my project which is wireless notice board controlled by GSM. But when I load my code on to the arduino and text, the lcd displays the AT commands, the date and time and the sender's number. I just want the lcd to disay just the content of the message I send.

If you need help then create a new thread. Hijacking random threads that have nothing to do with your problem isn't going to lead to you getting help and it's harmful to the other people here asking for help.

I see you have done this before:

Notice how well that worked out for you?

Please take a little time to read the "How to use this forum - please read." guide:

@JaggieGerhardt

I have read a number of forum posts about creating a second software serial port etc. but I do not understand this and I m looking for any guidance.

The MKR 1010 board have a UART on pin 14 (TX, output) and pin 13 (RX, input). In software, access it using Serial1 such as Serial1.begin(9600) and Serial1.read(). You do not have to disconnect the NFC reader because a different port used for programming and uploading. This only applies if you have not converted the board to use I2C.

Hi,

Thank you for this, after reading through some more documentation I saw that there was a second serial on the MKR board.

I have converted the NFC Reader to i2c whilst trying to get it to work, but should be able to get it back to UART.

If not would it be possible to get it working using i2c and if so could you point me in the right direction?

Thank you for your help

Jaggie

Ok,

I have put it back into UART mode.

Still not something not working - surely because I don’t understand something again!

#include <SPI.h>
#include <PN532_SPI.h>
#include <PN532.h>
#include <NfcAdapter.h>

PN532_SPI pn532spi(SPI, 10);
NfcAdapter nfc = NfcAdapter(pn532spi);

void setup(void) {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println(“NDEF Reader”);
nfc.begin();
}

void loop(void) {
Serial.println("\nScan a NFC tag\n");
if (nfc.tagPresent())
{
NfcTag tag = nfc.read();
tag.print();
}
delay(5000);
}

Is the code, But At the moment the library is returning that it cannot see the NFC board…

Thanks,

Jaggie

This is the wrong code for UART mode. For UART mode you need to follow the example code shown under this section of the documentation:
http://wiki.seeedstudio.com/Grove_NFC/#play-with-seeeduino-lite

Ah Noob error! Thanks,

This makes more sense now....

Next problem...

When try to compile it rejects with

_serial->write(0); - call of overloaded 'write(int)' is ambiguous

Suggestion on other forum posts say that the complier is stricter for the MKR boards and that I need to specify

_serial->write((byte)0);

I did this and it complied and all looked good until I tried to read the tag (the serial monitor echos "Scan the Tag" but any tag put in front of the reader isn't printed....

Thanks for your help.

Jaggie

Thanks again, this is a great help