Update README.MD

pull/8/head
yousseftech 2025-03-14 14:28:00 +02:00 zatwierdzone przez GitHub
rodzic caaf74304d
commit 66a66698fb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -2,12 +2,11 @@
uln2003 for `MicroPython` has been in github, here's the [link](https://github.com/IDWizard/uln2003). But it's work for `microbit`, so I change a little to transplant for my NodeMCU's `ESP-32s`. Here's the example:
```python
from stepper import Stepper
from machine import Pin
in1 = Pin(16,Pin.OUT)
in2 = Pin(17,Pin.OUT)
in3 = Pin(5,Pin.OUT)
in4 = Pin(18,Pin.OUT)
in1 = 16
in2 = 17
in3 = 5
in4 = 18
delay = 2
mode = 1 # 0 for half step, 1 for full step
@ -17,6 +16,9 @@ def main() -> None:
s1.step(100,-1)
s1.angle(180)
s1.angle(360,-1)
if __name__ == "__main__":
main()
```
function `angle` is angle, and the PIN map:
`IN1` link `PIN_16`