​ ​ ​ ​ ADC pot to servo position mapping - Page 2
Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14

Thread: ADC pot to servo position mapping

  1. #11

    Default

    Hippy, I must be dense because I don't know if Min is meant as a selection from a set of values by the program or by the programmer prior to coding. I don't find Min in the list of PICAXE BASIC commands, so ( b0 Min MIN_POT) means little to me, and 'Max b1' suggests the 'MAX value of B1' except that b1 has a particular value at execution of 'MAX b1'. Maybe you will have a similar problem interpreting by punctuation.
    Thank you for your reply.
    John

  2. #12

    Default

    Thank you. I should have done more study: in other words, more use of my time than use of your time. You are very kind. I have long been pleased how willing you and others on this forum are to give their up time. It makes this experience so much more enjoyable. Thank you.
    John

  3. #13
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    24,227

    Default

    MIN and MAX confused me when I first encountered them on the PICAXE because I imagined they selected the minimum or maximum value of two values respectively.

    They are in fact limiting or constraining operators; 'don't let a value be below a minimum', 'don't let the value be above a maximum'.

    In "a Min b - b", the MIN limits 'a' to have a value equal to or greater than the minimum value 'b', so that when 'b' is then subtracted the result will never go below zero - which would actually give a wrapround result on the PICAXE which only deals with positive integers.

  4. #14

    Default

    ''a Min b - b limited to low value of zero" is an excellent example . I'll remember that.

    Again, thank you.
    John

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •