当前位置:网站首页>Arduino stepper library drive 28byj-48 stepper motor test program
Arduino stepper library drive 28byj-48 stepper motor test program
2022-07-01 19:58:00 【perseverance52】
Arduino Stepper Library drive 28BYJ-48 Stepper motor test procedure
- Proteus Simulation

Stepper motor 28BYJ-48 Related parameters
Stepper motor 28BYJ-48, Step angle :5.625 degree , Namely 1 A pulse signal turns 5.625 degree ,64 A signal turns 360 degree . Reduction ratio :1/64, The motor inside the motor housing turns 64 circle , The part outside the motor housing turns 1 circle .
Stepper Library description
The phase sequence of the driver of the library source code is different , To drive
28BYJ-48Stepper motor
- Mode one : Define the way :
Stepper myStepper(motorSteps, 8,10,9,11); - Mode two : Adjust the motor line sequence .( This example adopts the line sequence )
- Mode three : Modify the relevant code as follows :
file location :C:\Users\Administrator\Documents\Arduino\libraries\Stepper\src, Medium Stepper.cpp Source file , The first 257 That's ok -278 That's ok , Revised as follows , Is to adjust the order of high and low levels of pins .

Stepper motor related parameters
Step AngleThis parameter determines , Program runtime , Can the stepper motor rotate for one turn .

Test function description
After running the simulation , The stepping motor stops after one revolution .
Sample code
/* Arduino control 28BYJ-48 Stepper motor test procedure */
// This sample program uses Stepper library
#include <Stepper.h>// Clicking here will automatically open the management library page : http://librarymanager/All#Stepper
// The external output shaft of the motor rotates for one cycle of steps
const int stepsPerRevolution = 64;
// Create stepper motor object
// Define motor control pins and basic motor information .
// The motor control pin is 8,9,10,11
// The above pins are connected in turn ULN2803 Drive plate In1, In2, In3, In4
Stepper steppermotor(stepsPerRevolution, 8, 9, 10, 11);
void setup()
{
Serial.begin(9600);
// set the speed at 60 rpm:
delay(1000);
Serial.println("Start...");
steppermotor.setSpeed(60);
steppermotor.step(128);
Serial.println("Stop...");
delay(1000);
}
void loop()
{
// Rotate slowly clockwise for one circle
// steppermotor.setSpeed(60);
// steppermotor.step(128);
// delay(1000);
// Rotate one circle counterclockwise quickly
// steppermotor.setSpeed(60);
// steppermotor.step(128);
// delay(2000);
}
Program source code and simulation resources
This example is based on
Proteus8.12platform .
link :https://pan.baidu.com/s/10_t4Z3nn6_e_Twm1NHcSpw
Extraction code :up7u
| Birdsong stream The Tang Dynasty · Wang wei |
|---|
| People idle sweet scented osmanthus fall , The night is still and the spring is empty . |
|---|
| The rising of the moon startles the birds , In the spring stream . |
|---|
边栏推荐
- 墨天轮沙龙 | 清华乔嘉林:Apache IoTDB,源于清华,建设开源生态之路
- [research materials] national second-hand housing market monthly report January 2022 - Download attached
- EasyCVR通过国标GB28181协议接入设备,出现设备自动拉流是什么原因?
- JVM内存模型
- HLS4ML进入方法
- [AI server setup] CUDA environment
- [research materials] iResearch tide Watching: seven major trends in the clothing industry - Download attached
- Redis installation and startup in Windows environment (background startup)
- Remove line breaks from MySQL query results
- mysql 報錯 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
猜你喜欢

JS的Proxy

Interesting! Database is also serverless!

开发那些事儿:EasyCVR平台添加播放地址鉴权功能

JS proxy

使用Zadig从0到1搭建持续交付平台

【多线程】 实现单例模式 ( 饿汉、懒汉 ) 实现线程安全的单例模式 (双重效验锁)

科技T3国产平台!成功搭载“翼辉国产实时系统SylixOS”

Redis installation and startup in Windows environment (background startup)

关于元宇宙下一代入口——脑机接口的实现

SQL getting started plan-1-select
随机推荐
Servlet knowledge points
Understand the structure in C language in one article
EasyCVR集群视频广场页面切换时,请求流未能终止的问题优化
Interview questions shared in today's group
有意思了!数据库也搞Serverless!
振弦采集模塊測量振弦傳感器的流程步驟
1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包
Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.
【C语言】详解 memset() 函数用法
Detailed configuration of network security "Splunk" in national vocational college skills competition
February 15, 2022: sweeping robot. There is a floor sweeping robot in the room (represented by a grid). Each grid in the grid has two possibilities: empty and obstacles. The sweeping robot provides fo
【无标题】
利用win7漏洞进行系统登录密码破解
switch 有四样写法你知道么
PowerDesigner设计Name和Comment 替换
qobject_ Cast usage
Mo Tianlun salon | Tsinghua qiaojialin: Apache iotdb, originated from Tsinghua, builds an open source ecological road
Cookie和Session的相关概念
Using win7 vulnerability to crack the system login password
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?