- Код: Выделить всё • Развернуть
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:7:22: error: WProgram.h: No such file or directory
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In member function 'void AFMotorController::enable()':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:29: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:29: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:39: error: 'LOW' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:39: error: 'digitalWrite' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In member function 'void AFMotorController::latch_tx()':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:47: error: 'LOW' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:47: error: 'digitalWrite' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:58: error: 'HIGH' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:64: error: 'HIGH' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:67: error: 'HIGH' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In function 'void initPWM1(uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:94: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:94: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In function 'void initPWM2(uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:132: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:132: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In function 'void initPWM3(uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:170: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:170: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In function 'void initPWM4(uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:210: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:210: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In constructor 'AF_Stepper::AF_Stepper(uint16_t, uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:323: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:323: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:325: error: 'HIGH' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:325: error: 'digitalWrite' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:340: error: 'OUTPUT' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:340: error: 'pinMode' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:342: error: 'HIGH' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:342: error: 'digitalWrite' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp: In member function 'void AF_Stepper::step(uint16_t, uint8_t, uint8_t)':
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:388: error: 'delay' was not declared in this scope
C:\Users\Виталий\Documents\Arduino\libraries\AF_Motor\AFMotor.cpp:398: error: 'delay' was not declared in this scope
Что делать???
вот собственно код программы:
- Код: Выделить всё • Развернуть
#include <AFMotor.h>
AF_DCMotor motor(2, MOTOR12_8KHZ); // create motor #2, 64KHz pwm
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Motor test!");
motor.setSpeed(200); // set the speed to 200/255
}
void loop() {
Serial.print("tick");
motor.run(FORWARD); // turn it on going forward
delay(1000);
Serial.print("tock");
motor.run(BACKWARD); // the other way
delay(1000);
Serial.print("tack");
motor.run(RELEASE); // stopped
delay(1000);
}