ITPNYU / p5.ble.js

A Javascript library that enables communication between BLE devices and a p5 sketch using Web Bluetooth API. https://itpnyu.github.io/p5ble-website.
MIT License
41 stars 29 forks source link

Unable to access more than 4 byte characteristic #14

Open MadhavPK opened 3 years ago

MadhavPK commented 3 years ago

I am working with Health Thermometer Service (UUID: 0x1809) I have enabled read and notify properties of the Temperature Measurement characteristic (UUID: 0x2A1C) which sends 5 byte data in SFLOAT format. I am using .read() api but the size of given datatype parameter is not enough to read the complete value.
I have tried using uint32 which shows 1 byte less. I have tried using float64 but the read value is always zero. Can you please suggest work around how to read the complete temperature data? Basically what I want to know is how to read large characteristics (say 100 byte long).