-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Labels
Description
I have a problem with the Serial connection in the Mbed OS (ArduinoCore - Mbed 2.2.0).
My goal with the nano 33 BLE is to transmit accelerometer data through BLE Long range. Then a raspberry Pi connected through SERIAL would take the data and package it and send it to some database. The setting of the BLE long range is only available in the MBed so that is why I am coding in the MBed format. The problem I have is that the USBSerial would crash and the board would freeze. I have also tried the default Serial from the normal Arduino coding which does not output to the serial port while the mbed.h is included. The code below is what I used for testing the usb serial connection. Any way to fix the crash?
#include "mbed.h"
#include "USBSerial.h"
//Virtual serial port over USB
USBSerial serial;
int main(void)
{
while (1) {
serial.printf("I am a virtual serial port\r\n"); // MBed USBSeial
Serial.println("Arduino here"); // Arduino Serial
delay(200);
}
}