Problem compiling a program - Arduino IDE

I’m currently trying to compile a simple example using the Arduino IDE on my “Sparkfun nRF52840 Pro Mini”.

For this I followed the tutorial here: https://learn.sparkfun.com/tutorials/nr … stallation

The problem is that I get the errors visible in the following capture:

" Uart Serial1( NRF_UARTE0, UARTE0_UART0_IRQn, PIN_SERIAL1_RX, PIN_SERIAL1_TX );
^~~~~~~~~~~~~~
PIN_SERIAL_RX "

Apparently, the define PIN_SERIAL1_TX and the define PIN_SERIAL1_RX cannot be found. This can be bypassed by adding the two defines in the variant.h file of the “Sparkfun Pro nRF52840 mini” has non-significant values.

However, I think that this is not the right solution and that there is a possibility to solve this in different ways.

Can you explain me how to solve this?

Here is also my configuration :

Capture_2.JPG

Hello,

I’m not able to get a good view of the code you are using. Can you post is as plain text?

I was able to more clearly read your code. Can you try switching from using “Serial” to “Serial1” to see if that changes anything.

TS-Brandon:
I was able to more clearly read your code. Can you try switching from using “Serial” to “Serial1” to see if that changes anything.

Hi, I am facing the same issue. Is that solved with the suggested changes and can you post the exact changes that are required and in what file?

Thanks,

Ofer Raz

My strongest suggestion would be try using a solution given by [paulhva.](https://forum.sparkfun.com/viewtopic.php?p=212763#p212763)

I had the same compile errors. I navigated to the folder using this path. this folder has the variant.h file

c:\user\xxx\AppData\Local\Arduino15\packages\adafruit\nrf52\0.18.5\variants\sparkfun_nrf52840_mini

In the variant.h file, scroll down to these lines, and change the SERIAL to SERIAL1 in both lines. This change also matches the section on the Sparkfun web site titled “Why the Sparkfun Pro nRF52840 Mini board definitions?” (this section has a blue background). After making these changes, the compile errors went away. i have not gone past getting the code to complile.

hope this helps

/*

  • Serial interfaces

*/

// Serial

#define PIN_SERIAL1_RX (15)

#define PIN_SERIAL1_TX (17)

Thank you it worked for me!

However, I can’t use the serial interface with all the terminals … For example, it works with RealTearm, Tera Term or the Arduino terminal, but impossible to work with Termite.

I would need to use the Termite terminal though…