Results 1 to 4 of 4

Thread: Math Question

  1. #1
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Math Question

    I have a unique problem I need to solve via math. As I turn a potentiometer it's output goes from 179 to 0, what I need is a math formula that changes that to a 181 to 360 Is that even possible??

    Thanks
    Rob

  2. #2
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Math Question

    Output = 360 - Input

  3. #3
    150+ Forum Groupie


    jonesthesoftware's Avatar
    Join Date
    Jul 2009
    Location
    aberdare, south wales UK
    Posts
    261
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Math Question

    Hi Rob
    not sure which way round you want it but

    converted value=(1-potvalue)+360
    so at
    pot 0 1-0+360= converted value of 360
    pot 179 1-179+360=converted value of +182

    or the other way round is
    converted value = 360-potvalue
    so
    pot at 179 360-179 =converted value of+181
    pot at 360 360-1 = converted value of 360

    I use 1, don't use 0 as computers crash if you try to subtract from 0

    hope this is what you wanted
    kind regards
    geoff

  4. #4
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Math Question

    Thanks, I figured it out just before bed last night. Take the input times -1 then add 360 That is a programmable formula with no need for tables.

    Rob