Не могу подключить билиотеку AFMotor.h
- Войдите на сайт для отправки комментариев
Пт, 28/03/2014 - 10:03
Сегодня по почте пришёл motor shield(http://www.ebay.com/itm/ICSE001A-L293D-Motor-Drive-Shield-Expansion-Boar...).
Скачал, установил библиотеку AFMotor, при попытке подключения библиотеки выдаются ошибки:
C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:1: error: stray '\353' in program C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:8:24: error: WProgram.h: No such file or directory C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In member function 'void AFMotorController::enable()': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:29: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:29: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:39: error: 'LOW' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:39: error: 'digitalWrite' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In member function 'void AFMotorController::latch_tx()': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:47: error: 'LOW' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:47: error: 'digitalWrite' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:58: error: 'HIGH' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:64: error: 'HIGH' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:67: error: 'HIGH' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM1(uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:92: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:92: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM2(uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:125: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:125: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM3(uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:159: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:159: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In function 'void initPWM4(uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:195: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:195: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In constructor 'AF_Stepper::AF_Stepper(uint16_t, uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:305: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:305: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:307: error: 'HIGH' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:307: error: 'digitalWrite' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:324: error: 'OUTPUT' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:324: error: 'pinMode' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:326: error: 'HIGH' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:326: error: 'digitalWrite' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp: In member function 'void AF_Stepper::step(uint16_t, uint8_t, uint8_t)': C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:376: error: 'delay' was not declared in this scope C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:388: error: 'delay' was not declared in this scope
Пробовал в файле "AFMotor.cpp" изменять "#include <WProgram.h>" на "#include <Arduino.h>", при компиляции выскакивает вот это:
C:\Users\tr1bls\Documents\Arduino\libraries\AFMotor\AFMotor.cpp:1: error: stray '\353' in program
Может кто сталкивался?
P.S Версия Arduino - 1.0.5
Как всегда, только задал вопрос и сразу же сам разобрался ))
Помогите! такая же проблема, как решить?
Спасибо разобрался!
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif