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


    Log in to reply
     


  • 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
 

1 out of 2

Suggested Topics


  • General Discussion   1 Mar 2015, 11:21

    87

  • Hardware   18 Nov 2023, 01:41

    3

  • Hardware   5 Feb 2024, 18:30

    7
  • 5

  • Hardware   25 Feb 2025, 20:56

    4

  • Hardware   14 Feb 2025, 20:03

    1

18
Online

11.5k
Users

11.1k
Topics

112.8k
Posts