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

  • 7
  • 6
  • 1
  • 13
  • 15
  • 7
  • 14
  • 27

155
Online

10.3k
Users

10.7k
Topics

109.8k
Posts