Everything nRF52840 Compile Question
-
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, rxMy 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.
Suggested Topics
-
Over the air updates
General Discussion • 23 Mar 2014, 21:38 • ToSa 1 Mar 2015, 11:21 -
Best VOC sensor for detecting a wide range of VOC's?
Hardware • 26 Oct 2023, 23:59 • NeverDie 18 Nov 2023, 01:41 -
"Remote Irrigation with LoRaWAN: LM27313 Challenges and PCB Design"
Hardware • 24 Jan 2024, 23:06 • wrendral 3 Feb 2024, 07:13 -
Sensors and more
Hardware • 19 Jun 2023, 00:41 • Robert Leverett 19 Jun 2023, 00:41 -
Best time of year to buy higher quality small project solar panels?
Hardware • 10 Jun 2021, 19:19 • NeverDie 30 Aug 2024, 14:01 -
Sensor to detect marijuana vape/smoke
Hardware • 21 Jan 2025, 06:36 • Hellmark 25 Feb 2025, 20:56