Giter Site home page Giter Site logo

Set custom max/min value about megadesk HOT 9 CLOSED

gcormier avatar gcormier commented on August 23, 2024 1
Set custom max/min value

from megadesk.

Comments (9)

gcormier avatar gcormier commented on August 23, 2024 1

That's an interesting use case! :) But definitely doable - the min/max are set as constants presently, but they could be loaded from EEPROM. Button pushes could be used to set these values, 20x for lower limit, 22x for upper.

(I do look back and wish I'd limited the memory to maybe 8 positions so these other functions would be less annoying to access, but with many units out there in the wild I would rather be consistent)

from megadesk.

conrad784 avatar conrad784 commented on August 23, 2024

I am very inexperienced with AVR programming, thats why I bought it assembled some time ago on tindie, but I'd like to put some time into adding this feature. I read in other issues you are recommending some hardware #20 (comment)
Could you provide a "development quickstart" in your Readme, something like:

  1. Supported way is using this USB-Dongle.
  2. Add those headers to your unit.
  3. connect pins like this (Everytime I switch TX and RX around in my serial interface history ;))
  4. Compile with make all.
  5. Program the unit with avrdude -c ....
    Of course only in the supported environment you are working in. Only basic stuff, not too beginner friendly. Only to know what works for others.

from megadesk.

gcormier avatar gcormier commented on August 23, 2024

Sure, I will put some basic links together - there's a lot out there so I'll try to find some good information.

from megadesk.

gcormier avatar gcormier commented on August 23, 2024

25a2157 adds some documentation on programming at the bottom of the readme now visible at the front page. I'm going to hide these comments - if you have further questions on programming, happy to help, just open a new issue so we keep this one dedicated to max/min values as I like the idea!

from megadesk.

djalexz avatar djalexz commented on August 23, 2024

Hi gcormier,

I got my controller today.
Thank you very much for the fast delivery.
And it's really a great part.

Could you still put in the limit for up and down?
I have a small cabinet under my desk.
Without limit it would be broken :-)

Thanks a lot

from megadesk.

gcormier avatar gcormier commented on August 23, 2024

Hello! It is not yet implemented. Firmware values could be changed if you are able to re-flash the controller.

from megadesk.

djalexz avatar djalexz commented on August 23, 2024

I have this Converter https://www.amazon.de/gp/product/B01CYBHM26/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Can i use this to flash the Firmware?
And what value must be changed for the min value?

THX

from megadesk.

gcormier avatar gcormier commented on August 23, 2024

No, that is merely a serial converter, which will not work for AVR programming. You can find more info at https://github.com/gcormier/megadesk#programming

from megadesk.

gcormier avatar gcormier commented on August 23, 2024

This is now also in the newly created dev branch.

I made a small change though - when we do an init, we will want the default min/max to be the biggest range possible.

void initAndReadEEPROM(bool force)
{
  int a = EEPROM.read(0);
  int b = EEPROM.read(1);

  if ((a != 18 && b != 13) || force)
  {
    for (unsigned int index = 0; index < EEPROM.length(); index++)
      EEPROM.write(index, 0);
    // Store unique values
    EEPROM.write(0, 18);
    EEPROM.write(1, 13);

    #ifdef MINMAX
    // reset max/min height
    EEPROM.put(40, DANGER_MIN_HEIGHT);
    EEPROM.put(44, DANGER_MAX_HEIGHT);
    #endif
  }
    #ifdef MINMAX
    EEPROM.get(40, minHeight);
    EEPROM.get(44, maxHeight);
    #endif
}

from megadesk.

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.