You are browsing as a guest. Sign up (or log in) to start making projects!

2h 10m 30s logged

It’s been a while but I’m back!

I made huge changes to the overall layout of the library, and decided that…

  • Brush objects are the devices themselves, and will allow you to connect, disconnect, view its state, send/receive BLE commands, etc.
  • OralBClient will only act as a “discovery layer”, which lets you search for new Brush objects and keep track of your connections (like a “management” layer I guess you could call it???)

I finished building the connect/disconnect commands with an optional timeout option for connections, and I moved rssi and macAddress into getters so they’re read directly from the peripheral and update automatically. Had to switch to the @stoprocent/noble fork because the previous one caused issues with discovery in Fedora.

In OralBClient, I added a way to track the brushes and store the connected ones in a Map (so users don’t have to keep track of the Brush objects elsewhere). I also added the option to stop discovery early, and an adapter state check before it starts discovering (so it waits for the Bluetooth adapter to power on first!)

0
3

Comments 0

No comments yet. Be the first!