Closed whitebearded closed 5 months ago
Hey @whitebearded , thanks so much for reporting this and sorting out the solution. I've fixed the power byte (cbba21b3b8c632649cd4a71444c78a4f7a2d919c) and added the sign to the output (ec1ffae0d2aafb5df5d5e58a9c89ab245b3aaeb1). I've tested it out on my pyxis but don't have a readily available lunar 2019, so it would be very helpful if you could confirm the functionality as well before I create a release. thanks!
I can't thank you enough! Finally, I've a really fast and stable BLE connection to my acaia lunar scale from 2019.
However, it took me a while to get the calculation correct as it was always returning 0.0. https://github.com/tatemazer/AcaiaArduinoBLE/blob/69b21a3f944b5fd5e99a673eed3354172ca84e6f/AcaiaArduinoBLE.cpp#L151
I think this is how it might need to look like:
For me this is working like a charm now. So it's using byte input[6] instead of input[5] for the power and I also added a sign check on byte input[7]. This was inspired by the LunarGatewayLibrary. By the way, the sign check seems to be missing for the "new" scale implementation, too.
I hope this may be helpful! Keep up the great work!