資源簡介
arduino的AFMotor庫文件
使用方法:http://blog.csdn.net/keysking/article/details/54783046
代碼片段和文件信息
//?Adafruit?Motor?shield?library
//?copyright?Adafruit?Industries?LLC?2009
//?this?code?is?public?domain?enjoy!
#if?ARDUINO?>=?100
??#include?“Arduino.h“
#else
??#include?“WProgram.h“
#endif
#include?
#include?“AFMotor.h“
static?uint8_t?latch_state;
#define?MICROSTEPS?16??//?8?16?&?32?are?popular
//#define?MOTORDEBUG?1
AFMotorController::AFMotorController(void)?{
}
void?AFMotorController::enable(void)?{
??//?setup?the?latch
??/*
??LATCH_DDR?|=?_BV(LATCH);
??ENABLE_DDR?|=?_BV(ENABLE);
??CLK_DDR?|=?_BV(CLK);
??SER_DDR?|=?_BV(SER);
??*/
??pinMode(MOTORLATCH?OUTPUT);
??pinMode(MOTORENABLE?OUTPUT);
??pinMode(MOTORDATA?OUTPUT);
??pinMode(MOTORCLK?OUTPUT);
??latch_state?=?0;
??latch_tx();??//?“reset“
??//ENABLE_PORT?&=?~_BV(ENABLE);?//?enable?the?chip?outputs!
??digital
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-12-15?15:04??AFMotor\
?????文件???????17067??2015-12-15?15:04??AFMotor\AFMotor.cpp
?????文件????????2112??2009-08-12?17:45??AFMotor\AFMotor.h
?????目錄???????????0??2015-12-15?15:04??AFMotor\Examples\
?????目錄???????????0??2015-12-15?15:04??AFMotor\Examples\MotorParty\
?????文件????????1267??2009-08-12?17:45??AFMotor\Examples\MotorParty\MotorParty.pde
?????目錄???????????0??2015-12-15?15:04??AFMotor\Examples\MotorTest\
?????文件?????????877??2015-12-15?15:23??AFMotor\Examples\MotorTest\MotorTest.pde
?????目錄???????????0??2015-12-15?15:04??AFMotor\Examples\StepperTest\
?????文件?????????875??2009-08-12?17:46??AFMotor\Examples\StepperTest\StepperTest.pde
?????文件?????????770??2009-02-18?14:14??AFMotor\keywords.txt
- 上一篇:64位win10RS485轉usb驅動實測可用帶教程
- 下一篇:LL1文法判定器
評論
共有 條評論