Go Down

Topic: Wifi MKR 1010 SoftwareSerial (Read 296 times) previous topic - next topic

jkpmoon

Hi,
I'm trying to use dynamixel xl320 on my Arduino wifi mkr 1010 board.

I tried with the dynamixel xl320 library

https://github.com/hackerspace-adelaide/XL320

with SoftwareSerial it works well without any additional circuit connections in Arduino Uno.
However, when I tried the same thing in Arduino Wifi mkr 1010 it keeps giving me an error when uploading
saying that

SoftwareSerial.h: No such file or directory

Anyone knows what's wrong?
Thanks

pylon

Quote
Anyone knows what's wrong?
Nothing is wrong, on the SAMD platform you simply don't need that horrible library as almost any pin can be used with hardware serial, called SERCOM on that platform. The class to define this is called Uart, for example Serail1 is defined this way:

Code: [Select]
Uart Serial1(&sercom5, 13, 14, SERCOM_RX_PAD_3, UART_TX_PAD_2);

void SERCOM5_Handler()
{
  Serial1.IrqHandler();
}

pert

I just want to clarify that the MKR 1010 already has a serial port named Serial1 set up on pins 13 and 14. There is no need to mess with SERCOM to use that port. Just use it like you would any hardware serial port normally.

If you do need additional ports then you can add them following this tutorial:
https://www.arduino.cc/en/Tutorial/SamdSercom

Go Up