-
Notifications
You must be signed in to change notification settings - Fork 0
API data source
xxyjskx1987 edited this page Mar 9, 2023
·
4 revisions
-
csv2array: Convert csv files to arrays.
param:
path: Path and file name.
data_begin_row: The data is collected from the first row.
data_index_col: What column data to collect, array type.
data_struct: 'col': the first dimension of the array is column data, 'raw': the first dimension of the array is row data.
ex:
var csv_ret = csv2array("D:/test.csv", {
data_begin_row: 1,
data_index_col: [6, 13, 20, 27, 34],
data_struct: 'col'
});
mlt_page_console_log(csv_ret, '\n');
-
mlt_serial_list: Serial port list.
param:
callback: Callback function.
ex:
mlt_serial_list(function(data) {
mlt_page_console_log(data.path, '\n');
});
-
mlt_serial_open: Open the serial port.
param:
path: Serial port name.
baudRate: Baud rate.
callback: Callback function.
ex:
mlt_serial_open('COM15', 115200, function(data) {
mlt_page_console_log(data, '\n');
});
-
mlt_serial_write: Write data to the serial port.
param:
data: Written data.
ex:
setTimeout(function() {
mlt_serial_write('ddddd;');
mlt_serial_write('ffff;');
}, 500);