0
votes

I'm translating a program about an RFM Hopper Transmission from Arduino to C, but I'm stuck with the method Serial, since I don't exactly know what it does.

It only appears in the following line, inside the main of the program.

Serial.begin(115200);

I've searched online through the documentation of Arduino and only understand that it's used for comunication between the Arduino board and the other devices.

If cannot use it in my C program though, what am I missing?

https://www.arduino.cc/reference/en/language/functions/communication/serial/

If I can explain anything with more detail from my project please feel free to ask.

1
The link you give includes a list of serial functions and each of them links to its own page, with examples. Arduino also publishes a Software Serial Example in their tutorials, and there is plenty of other tutorial material to be found. Note that Arduino's language is not C, it is more like C++. - Weather Vane
Thanks, I will surely research more into that link, although my main question is still up and it relates with your last note, since my program is in C and i can't find any similar method to replace it with. All I see is written in Arduino or C++. - BarberaThor
Possible duplicate of How to open, read, and write from serial port in C? Although it is focussed on Linux. - Weather Vane
Here is the documentation for Serial.begin (not just Serial). - user253751

1 Answers

1
votes

Serial is an object, predefined in the Arduino environment, which is in C++ (not C )

To use it, you should call Serial.begin(<baud>); in the setup() function of the Arduino environment, then you can use any method of Serial or the underlying base class Stream