javascript source code for digital meter

Solutions on MaxInterview for javascript source code for digital meter by the best coders in the world

showing results for - "javascript source code for digital meter"
Augustine
27 Apr 2020
1function handleData(event) {
2var buf = event.target.value.buffer;
3if (buf.byteLength >= 20 ) {
4// reading characteristic FFB1:
5var str = String.fromCharCode.apply(null, new Uint8Array(buf));
6console.log('I got ' + str);
7} else {
8// reading characteristic FFB2:
9console.log(new Uint8Array(buf));
10}
11}
12