Total newbie here and struggling straight away

I keep getting this message come up any help or advise much appreciated

Arduino: 1.8.19 (Mac OS X), Board: "Arduino Nano Every, None (ATMEGA4809)"

/var/folders/4p/n5y3l_t11wg4hmvf0lbkldz80000gn/T//ccoh9GCW.ltrans0.ltrans.o: In function `setup':
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:20: undefined reference to `ServoEasing::attach(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:21: undefined reference to `ServoEasing::attach(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:22: undefined reference to `setSpeedForAllServos(unsigned int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:23: undefined reference to `ServoEasing::setEasingType(unsigned char)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:24: undefined reference to `ServoEasing::setEasingType(unsigned char)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:25: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
/var/folders/4p/n5y3l_t11wg4hmvf0lbkldz80000gn/T//ccoh9GCW.ltrans0.ltrans.o: In function `loop':
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:37: undefined reference to `ServoEasing::setEaseTo(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:38: undefined reference to `ServoEasing::setEaseTo(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:39: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:44: undefined reference to `ServoEasing::setEaseTo(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:45: undefined reference to `ServoEasing::setEaseTo(int)'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:46: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
/var/folders/4p/n5y3l_t11wg4hmvf0lbkldz80000gn/T//ccoh9GCW.ltrans0.ltrans.o: In function `_GLOBAL__sub_I_servoTop':
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:2: undefined reference to `ServoEasing::ServoEasing()'
/Users/weller/Documents/Arduino/ironman_first_try/ironman_first_try.ino:3: undefined reference to `ServoEasing::ServoEasing()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Nano Every.


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Post the code in code tags, please.

here's the code I'm trying to put on it

#include "ServoEasing.h"
ServoEasing servoTop;
ServoEasing servoBottom;

const int action_pin = 2;
const int ledPin = 6;
const int potPin = A0;
int location = 31;
int bottom_closed = 107;
int top_closed = 167;
int bottom_open = 20;
int top_open = 20;
int value;
int maxBrightness;

void setup()
{
  pinMode(action_pin, INPUT_PULLUP);
  pinMode(potPin, INPUT);
  servoTop.attach(9);
  servoBottom.attach(10);
  setSpeedForAllServos(190);
  servoTop.setEasingType(EASE_CUBIC_IN_OUT);
  servoBottom.setEasingType(EASE_CUBIC_IN_OUT);
  synchronizeAllServosStartAndWaitForAllServosToStop();

 }

void loop()
{
 value = analogRead(potPin);
 maxBrightness = map(value, 250, 750, 0, 255);
 int proximity = digitalRead(action_pin);
 if (proximity == LOW)
 {
  if (location > bottom_open) {
    servoTop.setEaseTo(top_open);
    servoBottom.setEaseTo(bottom_open);
    synchronizeAllServosStartAndWaitForAllServosToStop();
    location = bottom_open;
    delay(10);
    analogWrite(ledPin, 0);
   } else {
    servoTop.setEaseTo(top_closed);
    servoBottom.setEaseTo(bottom_closed);
    synchronizeAllServosStartAndWaitForAllServosToStop();
    location = bottom_closed;
    delay(50);
    analogWrite(ledPin, maxBrightness / 3);
    delay(100);
    analogWrite(ledPin, maxBrightness / 5);
    delay(100);
    analogWrite(ledPin, maxBrightness / 2);
    delay(100);
    analogWrite(ledPin, maxBrightness / 3);
    delay(100);
    analogWrite(ledPin, maxBrightness);
    delay(100);
    }
   }
  }

I have a vague recollection that the Every doesn't play well with servos, but the library says that it is supported.

I note though that there was a recent fix for the Nano Ever(y). Do you have the latest version of the library?

yes I updated it all so am running the newest version of everything

Check the example code. In simple.ino I see this for example:

#include "ServoEasing.hpp"

it looks like its not compiling for any board so there must be something wrong in the code somewhere :frowning:

managed to sort it out now I think. i had to downgrade the servoEasing to 2.3.3

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.