我尝试接收 celestron nexstar goto 系统的 goto 固件版本。
我使用串行端口库接收了一些数据,但收到了一些奇怪的字符,Termite 是唯一能显示好字符的软件。
这是我收到的数据和 Termite 显示的数据的示例。
来自 node.js 的串行端口:♦§#
白蚁 : [04][15]#
这是连接到安装并显示接收到的数据的代码:
var telescope = new serial(port.comName, {
baudRate: 9600,
stopBits: 1,
parity: 'none'
});
telescope.on('open', function () {
telescope.on('data', function (data) {
console.log('Data : ' + data);
});
telescope.write('V');
});
有什么方法可以显示好的数据吗?我搜索,我认为这是一个编码问题
谢谢你的帮助 !