Arduino UNO Iron Man kask kodu

Küçük kobra

Kilopat
Katılım
30 Ocak 2017
Mesajlar
1.339
Makaleler
1
Çözümler
1
Yer
Istanbul
3D yazıcıdan Iron Man kaskı bastım elektronik aksam için Arduino gerekiyordu Arduino hakkında hiçbir bilgim yok kodları kopyalayıp yapıştırdım ama hata verdi yardımcı olabilir misiniz?

Kod:
#include "ServoEasing.h"
ServoEasing servoTop;
ServoEasing servoBottom;
const int action_pin = 2;
int location = 31;
// Below numbers should be adjusted in case the facemask does not close/open to desired angle.
int bottom_closed = 107;
int top_closed = 167;
int bottom_open = 20;
int top_open = 20;
void setup()
{
 pinMode(action_pin, INPUT_PULLUP);
 servoTop.attach(9);
 servoBottom.attach(10);
 setSpeedForAllServos(190);
 servoTop.setEasingType(EASE_CUBIC_IN_OUT);
 servoBottom.setEasingType(EASE_CUBIC_IN_OUT);
 synchronizeAllServosStartAndWaitForAllServosToStop();
}
void loop()
{
 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(600);
 } else {
 servoTop.setEaseTo(top_closed);
 servoBottom.setEaseTo(bottom_closed);
 synchronizeAllServosStartAndWaitForAllServosToStop();
 location = bottom_closed;
 delay(600);
 }
 }
}

Hata da şu şekilde;

Kod:
C:\Users\sanan\AppData\Local\Temp\cc7aVHP4.ltrans0.ltrans.o: In function `setup':
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:14: undefined reference to `ServoEasing::attach(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:15: undefined reference to `ServoEasing::attach(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:16: undefined reference to `setSpeedForAllServos(unsigned int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:17: undefined reference to `ServoEasing::setEasingType(unsigned char)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:18: undefined reference to `ServoEasing::setEasingType(unsigned char)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:19: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
C:\Users\sanan\AppData\Local\Temp\cc7aVHP4.ltrans0.ltrans.o: In function `loop':
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:27: undefined reference to `ServoEasing::setEaseTo(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:28: undefined reference to `ServoEasing::setEaseTo(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:29: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:33: undefined reference to `ServoEasing::setEaseTo(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:34: undefined reference to `ServoEasing::setEaseTo(int)'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:35: undefined reference to `synchronizeAllServosStartAndWaitForAllServosToStop()'
C:\Users\sanan\AppData\Local\Temp\cc7aVHP4.ltrans0.ltrans.o: In function `_GLOBAL__sub_I_servoTop':
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:2: undefined reference to `ServoEasing::ServoEasing()'
C:\Users\sanan\AppData\Local\Temp\.arduinoIDE-unsaved2022815-10496-14xmc8y.h6d5h\sketch_sep15a/sketch_sep15a.ino:3: undefined reference to `ServoEasing::ServoEasing()'
collect2.exe: error: ld returned 1 exit status.

exit status 1

Compilation error: exit status 1
 

Yeni konular

Geri
Yukarı