Skip to content

sfx2k/ULN2003-for-ESP32

This branch is 5 commits behind zhcong/ULN2003-for-ESP32:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

efe3ba6 · Aug 10, 2021

History

4 Commits
Dec 18, 2018
Jun 11, 2020
Jun 11, 2020
Dec 18, 2018
Dec 18, 2018

Repository files navigation

ULN2003 for ESP32

uln2003 for MicroPython has been in github, here's the link. But it's work for microbit, so I change a little to transplant for my NodeMCU's ESP-32s. Here's the example:

import Stepper
from machine import Pin
s1 = Stepper.create(Pin(16,Pin.OUT),Pin(17,Pin.OUT),Pin(5,Pin.OUT),Pin(18,Pin.OUT), delay=2)
s1.step(100)
s1.step(100,-1) # or s1.step(-100)
s1.angle(180)
s1.angle(360,-1) # or s1.angle(-360)

function angle is angle, and the PIN map: IN1 link PIN_16 IN2 link PIN_17 IN3 link PIN_5 IN4 link PIN_18 My uln2003 board like this, and stepper runing:
uln2003 uln2003

About

ULN2003 for ESP32 in MicroPython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%