Dear all,
I have been trying to create serial1 in Feather MO, using pins RX and TX, with the code attached, based on the links;
#include <Arduino.h> // required before wiring_private.h
#include "wiring_private.h" // pinPeripheral() function
//Uart Serial1( &sercom0, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
Uart Serial1( &sercom0, 0, 1, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
void SERCOM0_Handler()
{
Serial1.IrqHandler();
}
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
// Assign pins 0 & 1 SERCOM functionality
pinPeripheral(0, PIO_SERCOM);
pinPeripheral(1, PIO_SERCOM);
}
uint8_t i=0;
void loop() {
Serial.print(i);
Serial1.write(i++);
if (Serial1.available()) {
Serial.print(" -> 0x"); Serial.print(Serial1.read(), HEX);
}
Serial.println();
delay(10);
}
However, it just doesn't work and I got the following error message;
Error compiling for board Adafruit Feather M0
I real thanks for any help about.
Cesar