我想向蓝牙写入字符串‘
#PW = 2 F5AC
’应该怎么转换成ArrayBuffer类型。请问该怎么做,求大佬解答
const buffer = new ArrayBuffer(8)
const dataView = new DataView(buffer)
for (var i = 0; i < senddata.length; i++) {
dataView.setUint8(i, senddata.charAt(i).charCodeAt())
}