ParticulaCode / GoDiceJavaScriptAPI

GoDice JavaScript API (with demo)
Other
53 stars 20 forks source link

Wanting to get the current "roll" on connect #10

Open kevin-huff opened 1 year ago

kevin-huff commented 1 year ago

First time messing with bluetooth, I'm wanting to get the current "roll" on connect. The dice disconnect often. Sometimes during a roll, I'd like to auto-reconnect (figured that out), but that doesn't give me any info about the position of the dice. I'd be interested to see all the Services and Characteristics available, not sure where to look for more info to find out if this is even possible.

ragcsalo commented 11 months ago

I have the same request.... I will try to snoop the BT connection of the official app and get the command for getting the current dice state. ;-)

ragcsalo commented 11 months ago

Solution: just send hexa "19" to the die, and the following will happen:

You still have to query the die color by sending hexa "17" to the die.

I hope this helped! :-)