Skip to content

Commit 865d922

Browse files
authored
functions part added
1 parent 87df359 commit 865d922

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ A4988, DRV8825, DRV8834, DRV8880,TB6600... and generic two-pin stepper motor dri
2020
- PUL+ **-** Arduino Pin 3
2121
- A-, A+ **-** Coil 1 stepper motor
2222
- B-, B+ **-** Coil 2 stepper motor
23+
# **Functions**
24+
```c
25+
void init(); //makes pin configuration
26+
void active(bool _active); //makes enable pin low
27+
void run(uint64_t _rpmt);//motor rotation start with RPM value
28+
void set(bool _dir, uint8_t _rpm, uint16_t _pulse);//sets direction ,RPM value and steppping value
29+
void run();//motor rotation start with last setted RPM value
30+
```
31+
Before use ```c run();``` function ```c set();``` function have to configure.
2332
# **Code**
2433
See basic two direction stepping 1:8 1 tour for each direction example.
2534
```c
@@ -48,7 +57,6 @@ void setup() {
4857
4958
nema23.init();
5059
51-
//nema23.active(DEACTIVE);
5260
}
5361
5462
void loop() {
@@ -65,7 +73,7 @@ void loop() {
6573
6674
for (size_t i = 0; i < 1600; i++)
6775
{
68-
//nema23.run();
76+
nema23.run();
6977
}
7078
}
7179

0 commit comments

Comments
 (0)