NB-IoT shield with Arduino ZERO (solved)

Hello,

#if defined(ARDUINO_AVR_LEONARDO)
#define DEBUG_STREAM Serial 
#define MODEM_STREAM Serial1

#elif defined(ARDUINO_AVR_UNO)
SoftwareSerial softSerial(10, 11); // RX, TX
// You can connect an uartsbee or other board (e.g. 2nd Uno) to connect the softserial.
#define DEBUG_STREAM softSerial 
#define MODEM_STREAM Serial

#elif defined(ARDUINO_SODAQ_EXPLORER)
#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial

#elif defined(ARDUINO_SAM_ZERO)
#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1

#else
#error "Please select one of the listed boards."
#endif

I’ve been uploading on a Arduino Leonardo…, now i got a Arduino GENUINE ZERO, i don’t get the Serial-port to put something out. The error i get is: “Please select one of the listed boards”. What are the Serial-ports on he GENUINO ZERO?

Thanks,
Paul

For the Zero, you can remove all of that code and replace it with:

#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial

Alternatively, you can add another compiler directive to define the above when compiling for the Zero.

Gabriel,

I changed it to SerialUSB and Serial.
The only output i get with the AllThingsTalk example is:
ATATATATATATATATATATATATATATATATATATAT

Gabriel,

To get the information from MODEM_STREAM you need to set it on Serial1 instead of Serial.

Yup, answer was already here:

Jan,

The DEBUG_STREAM needs to be on Serial instead of SerialUSB, else you won’t get the information out of the uBlox chips.
The problem i got now, is that it works in the example, only not in the refactered code i made myself.

@Paul93K

It depends on what USB port on the board you use.
Serial and SerialUSB, one for the programming other for the native.

Kind regards,
Jan

True,

On the native port you use:

#define DEBUG_STREAM SerialUSB
#define MODEM_STREAM Serial1

On the programming port you use:

#define DEBUG_STREAM Serial
#define MODEM_STREAM Serial1

Thanks Jan!