Method of converting into ordinary array:
1, structure
uint 8 array = new uint 8 array(length);
2. Conversion method:
( 1)var array = array . from(uint 8 array)
(2)var array =[]. slice . call(uint 8 array)
Precautions:
//When //js writes data to ble, the data type is arraybuffer. After Uint8Array sets the data, if you use,
Array method, be careful. //The memory after Uint8Array.buffer returned by the subarray is the memory before the subarray.
Save. //If you want to transmit new data, you'd better open up new memory to avoid the problems caused by the difference between what you see and what you measure.