| 数据搜索系统,热门电子元器件搜索 |
|
DFR0508 数据表(PDF) 17 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0508 数据表(HTML) 17 Page - DFROBOT |
|
17 / 18 page ![]() The library used to control DC motor and stepper motor, including C.W rota tion, C.C.W rotation, speed adjustment and stopping. 1. Open drive hardware of DC motor and stepper motor, read Product ID and Version ID. void init(); 2. Shutdown the drive hardware.void shutdown(); 3. Stop the motor rotation. void stop(); 4. Set the DC motor rotation direction and start rotating. void start(uint8_t dir);dir: set direction CW or CCW 5. Set angle, speed, direction of the stepper motor rotation and start rot ating. void start(float angle, uint16_t speed, uint8_t dir);angle: set the rotati on resolution. The maximum resolution is 0.9° which means the minimum rotate angle is 0.9 °. So that the motor won't rotate if the resolution set to be 0.1°and only ro tate to 0.9° if the resolution set to be 1°. Min: 0° (if the rotate angel set to be 0, the motor will keep rotating). speed: set speed. The speed range is 0~1023. Set it to 0 and the rotate sp eed is 0r/min;set it to maximum 1023 and the rotate speed is 200r/min. dir: set direction. dir=CW: rotate in C.W.(Clockwise) ; dir=CCW: rotate in CCW(anti-clockwise) 6. Speed control of DC motor & stepper motor void speed(uint16_t val);val: set speed motor:0<=val<=4096 stepper: 0<=val<=1023 |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |