Code Monkey home page Code Monkey logo

Comments (4)

erichiggins avatar erichiggins commented on May 13, 2024

This is my fault. I added this mock interface so the developer who helped create the mobile app had something to work with (because they don't own a scale). I have not maintained the mock interface, so I'm not entirely surprised that it broke.

I've been rethinking the workflow though, so I'd like to hear your thoughts.

Right now, Bluetooth doesn't advertise unless the scale is working. Seemed like a good idea at the time, but now I think it causes more confusion than it prevents. I think I might change that -- advertise on BT and just surface the scale status to app so users know where the issue is.

Additionally, there are other brands/models of scales that folks would like to use instead. To make it easier to develop a new scale adapter, I might write a generic/boilerplate one that simply logs whatever it reads from the serial port and has stubs that can be filled in to make it functional.

Neither of these solve the mock scale being broken, of course. I'm wondering if it's still needed or useful if I made the two changes suggested above.

from projects.

alien2108 avatar alien2108 commented on May 13, 2024

I would rather suggest you do the following:

  • Make bluetooth optional and implement direct functions to be called (with bluetooth disabled):
    a) setWeight
    b) getWeight
    c) getStatus
    d) mainLoop (here you place code that should be executed all the time as refresh display, read keys...)

Basically all you display on bluetooth phone I would like to display on a simple Pi Zero Display HAT as https://www.waveshare.com/wiki/1.44inch_LCD_HAT

It has joystick (up/down +-1gr, left/right +-0.1gr), three buttons (1 - get default weight, 2 - set default weight, 3 ...) and a cool display. No bluetooth, no phone...

I tried to implement it, but your code currently is too interlinked with bluetooth.

from projects.

erichiggins avatar erichiggins commented on May 13, 2024

I see. Does this relate to the mock scale issue somehow? If you're not planning on using Bluetooth, then this falls a bit further outside of the Open Trickler intended design.

Since it's an open source project, you're welcome to fork and modify the code to meet your use case. A lot of folks have different design ideas that they share with me, but I cannot commit to writing several different versions of this project to support them.

We have a lot of folks discussing their designs and ideas over on Discord. Perhaps you can discuss it there and get some support from the community!

from projects.

erichiggins avatar erichiggins commented on May 13, 2024

Closing this out since the code has changed significantly.

from projects.

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.