Skip to content

Instantly share code, notes, and snippets.

View gyula-ny's full-sized avatar

Gyula Nyirfalvi gyula-ny

View GitHub Profile
@yvele
yvele / ULN2003StepperMotor.js
Created April 1, 2023 23:11
Stepper Motor and ULN2003 Driver Board on Raspberry Pi with Node.js
// Inspired from:
// https://ben.akrin.com/driving-a-28byj-48-stepper-motor-uln2003-driver-with-a-raspberry-pi/
// https://gist.github.com/wolli2710/9ae48c9f39737896c1f6
const { Gpio } = require("onoff");
const in1ToGpio = 17; // IN1
const in2ToGpio = 18; // IN2
const in3ToGpio = 27; // IN3
const in4ToGpio = 22; // IN4
const timeout = 1; // milliseconds