Construct a working C++ program in either Dev-C developer for implementing a serial port programming code. You need to access the data coming in the serial port (USB port) via Arduino, to your laptop/desktop, and log that data into a text file called Log.txt.
You must find when the port is active and hence open the file, write the incoming data and
finally close it.
Check again for incoming data and re-open the file, to append new data.
For the Arduino, the following code is given, you have to use this.
x = 0;
Serial.print(“The Value of the variable is =”);Serial.println(x);