'multiMap' was not declared in this scope

I'm trying to use the multiMap function and I keep getting the "'multiMap' was not declared in this scope". Is there anything I'm missing that I need to use this function?

Is there anything I'm missing that I need to use this function?

How would we know ?
Post your code

UKHeliBob:
How would we know ?
Post your code

He is right: it's easier than searching in a crystal ball... Although mine provided that link which may help you...

Oye, that would help. Sorry about that

void setup() {
  Serial.begin(9600);
  
}

void loop() {
     int pos[] = {0, 2, 5, 10, 14};
     int anreading[] = {0, 65, 245, 534, 773};
     int distance;
     int input = analogRead(A0);
 
     
     

 
    distance = multiMap(input, anreading, pos, 5);
    Serial.println(distance);
    delay(10);


}

Oye, that would help

Are you keeping the rest of it secret or did you really not have the multiMap() function in your program ?

I don't see a multimap fuction so I am assuming you are trying to use a library. If so read up on using libraries
here https://www.arduino.cc/en/Guide/Libraries

Sorry about that; I'm only two days into using Arduino and in a little over my head on project. I'll do some more research

No need to use a library, just copy / paste before your setup the code in the link I provided. I mean, this code:

// note: the _in array should have increasing values
int multiMap(int val, int* _in, int* _out, uint8_t size)
{
  // take care the value is within range
  // val = constrain(val, _in[0], _in[size-1]);
  if (val <= _in[0]) return _out[0];
  if (val >= _in[size-1]) return _out[size-1];

  // search right interval
  uint8_t pos = 1;  // _in[0] already tested
  while(val > _in[pos]) pos++;

  // this will handle all exact "points" in the _in array
  if (val == _in[pos]) return _out[pos];

  // interpolate in the right segment for the rest
  return (val - _in[pos-1]) * (_out[pos] - _out[pos-1]) / (_in[pos] - _in[pos-1]) + _out[pos-1];
}