Everything nRF52840 Compile Question



  • Re: Everything nRF52840

    User NeverDie posted some sample code for transmitting a 1 byte payload 2 2 mps once per second. When I try to bring this code example over, I get a compile error on the third line of the example:
    Serial pc(USBTX, USBRX); // tx, rx

    My guess is that Serial is a typedef, but so far I cannot find it. Is there a header file other than "mbed.h" that includes a typedef for "Serial"?
    Thanks,

    Mike Marks



  • Hello @mmarks3141,

    I am just learning about nRF52840. My IDE is Eclipse/Sloeber and Arduino NANO BLE 33. And I do not want to use the mbed-OS, because it destroys the timing of my self developed libraries running on any Arduino-Board.
    Your question is about using a serial interface, which depends on the firmware of your board. If it is mbed-OS, please look to the documentation of mbed: https://os.mbed.com/handbook/Serial.
    If it is not mbed-OS, look for the resources of Your boards firmware/libraries.
    For me (Arduino), it would be the initialization with Serial.begin(bitrate) in setup() and using Serial.print() for the output somewhere in loop().
    By the way, thanks to @NeverDie for the examples.


Log in to reply
 

Suggested Topics

  • 87
  • 7
  • 6
  • 8
  • 1
  • 5

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts