I need some help with "Terminal EZB" panel under general skills. I have got a few sensors added at JD's hands through an Arduino board. The sensors are expected to transmit some data and I am able to see it like below.
Now, I'm trying to save this data to a text file and I've written the following code.
However, I suspect that this piece of code is not correct as it prints only the timestamps and nothing else. So, can anyone please please point the error in this code?
// Add the filename and use double \\ for the folder separator
var filename = "c:\\temp\\mylog.txt";
var uart_data = UART.hardwareUartReadStringAvailable(1,0);
var d = new Date();
var outStr = d.getHours().toString().padStart(2, '0') + ":" +
d.getMinutes().toString().padStart(2, '0') + ":" +
d.getSeconds().toString().padStart(2, '0') + ":" +
d.getMilliseconds().toString().padStart(3, '0') + "," +