FSG / System_

Fork of System_7_14 by Troy Holley

conversions.cpp

Committer:
mdavis30
Date:
2017-07-21
Revision:
5:26c9083b1bf2
Parent:
4:66f2b18a16a4

File content as of revision 5:26c9083b1bf2:

#include "conversions.hpp"

float counts_to_dist(int count)
{
    float conv = 0.001220703*(-105.98*count)+388.51; //MELISSA
    //float conv = .13109129517*count-6; // TRENT
    
    //TROY
    //float conv = -0.1243 * count + 378.31;  //created on 7/13/2017 by reading from extended (0 mm) end of piston
    return conv;

};

//had an issue with the original equation
//need to double check the counts VS position (with a tape measurer)

//adc.ch0 or whatever gives you this