Coder Social home page Coder Social logo

Connect to and use Decent Scale about cofi HOT 10 OPEN

Blechpirat avatar Blechpirat commented on June 3, 2024
Connect to and use Decent Scale

from cofi.

Comments (10)

decentjohn avatar decentjohn commented on June 3, 2024 2

Yeah, absolutely, and double-plus absolutely because you're a FLOSS app.

I'm in France, so if you don't mind I'll send you one of my own, kinda scratched up, Decent Scales, so we can avoid any EU tax fun.

API docs here:
https://decentespresso.com/decentscale_api

and I can help if any questions.

from cofi.

rozPierog avatar rozPierog commented on June 3, 2024 1

Thanks for bringing to my attention that Decent has a developer program, and that they can send free scale to help with the implementation. I've sent them an email and I'll wait for the response. It would be nice to have features you are talking about

from cofi.

mtrewartha avatar mtrewartha commented on June 3, 2024 1

@rozPierog I'm not sure how much BLE experience you have, but I've worked professionally with Android BLE for years and I'm happy to be a resource if that's helpful. I'd also be happy to contribute!

Here's another link for you: JuulLabs/Kable is a fantastic multi-platform Kotlin library for working with BLE. We use it to great effect at @parsyl on both Android and iOS. It translates all of the callback-based Android APIs to a great Kotlin coroutines-based API that makes development much easier.

from cofi.

rozPierog avatar rozPierog commented on June 3, 2024 1

Oooooh, that's amazing thanks @mtrewartha I'll definitely look into this as my experience with BLE is non-existent.

from cofi.

Blechpirat avatar Blechpirat commented on June 3, 2024

Thanks John!

from cofi.

rozPierog avatar rozPierog commented on June 3, 2024

Resources to look at when implementing:
https://punchthrough.com/android-ble-guide/
https://developer.android.com/guide/topics/connectivity/bluetooth/ble-overview
https://decentespresso.com/decentscale_api

from cofi.

decentjohn avatar decentjohn commented on June 3, 2024

It's super easy, though. The steps are:

  1. scan for devices, get a bluetooth device id
  2. connect to that device id
  3. "subscribe" to data from one of the numbered services
  4. receive weight data

from cofi.

rozPierog avatar rozPierog commented on June 3, 2024

I'm sure that it's easy, but sadly I don't have time to learn ins and outs of Android bluetooth stack, right now, so to have that burden lifted via already battle tested library will be a great help

from cofi.

decentjohn avatar decentjohn commented on June 3, 2024

oh, totally think you should use the library, but the steps will likely be the same. It's just that the library will hide some complexity of the implementation, and (nicely) avoid you having to learn the different platform issues.

I'm reading the docs:
https://github.com/JuulLabs/kable

and my 1-2-3-4 steps will still apply. But you'll likely have code from Kable that you can copy/paste.

from cofi.

mtrewartha avatar mtrewartha commented on June 3, 2024

Yup, I think those same steps likely apply (admittedly haven't looked at the scale BLE API). There's definitely a learning curve to BLE so if you beat me to this, don't hesitate to ping me with questions!

from cofi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.