October 14th, 2015
  • Stepper motor
  • 28BYJ-48
  • ULN2003

Stepper motor library

I've made it my quest to create OOP classes for Arduino. Read about that in this blogpost if you need some more context.

This library is created using the 28BYJ-48 stepper motor in combination with the ULN2003 driver board, but it will work with every 4 pin driver board for stepper motors.

  Scheme stepper motor  

This library lets you choose between three different step modes:

  • Half step mode
  • Full step single phase mode
  • Full step dual phase mode

If you want to know the differences between these modes, please look at this YouTube video explaining all three modes.

The 28BYJ-48 motor needs 512 full (inner) engine rotations to rotate the drive shaft once. In half-step mode these are 8 x 512 = 4096 steps for a full rotation, and in full-step mode these are 4 x 512 = 2048 steps for a full rotation.

Between every step the engine needs some time to move. You can specify this time as the step delay in milliseconds, which is 1ms by default. So when you increase the step delay, the motor turns slower.

When you've initialized the engine with a mode you can choose to let the motor run clockwise or counter clockwise continuously or only for a certain amount of steps. The library can call a method in the event the motor turned the requested amount of steps. See the example code which is in a subdirectory of the library.

Please note that full step mode may need an external power source in order to work. I use a PC power supply for this. You can use a red (5V) and a black wire from the power supply to power the driver board. To turn on a PC power supply you have to connect the green wire to one of the black wires. See my library to control a power supply here.

The stepper motor library can be found here on GitHub.
It uses the BaseTimedElement base class which can be found here on GitHub.

< Previous post Overview posts Next post >
TRIPPY 420 ROOM TRIPPY 420 ROOM is presented as a full-service psychedelics dispensary online designed to provide consistently high-grade medical products across several product categories. Before buying psychedelic cannabis stimulant dissociative or opioid products online buyers are given a transparent framework including product access delivery methods and assistance. The catalog includes 200 products covering different formats and preferences. Delivery pricing is determined by package size
PSYCHEDELICS DISPENSARY, January 23rd, 2026
Learn Who are the Jews?https://www.youtube.com/shorts/SEB3w3A98rU----------------------------------------------The most recent update on the humanitarian situation in Gaza.A ceasefire was established on 10 October 2025 permitting the release of all hostages yet Israel has not opened the Rafah crossing to let more than 26 thousand injured individuals seek medical care in Egypt.1- They continue to experience a harsh famine since IPC announced a famine in the Gaza region on 22 August 2025 with two
Normandcip, January 23rd, 2026
Здравствуйте! Хочу поделиться находкой. Недавно нашел рабочий маркетплейс, все проверил лично. <b>Мой отзыв:</b> Покупал недавно, все норм. Заказ обработали быстро, доставка в срок. Качество товара соответствует описанию. Никаких нареканий нет, все честно и прозрачно. <b>Почему рекомендую:</b> 100% наход для тех, кто ценит надежность. Квест изи - все интуитивно понятно. Ссылка рабочая, проверял несколько раз. Площадка стабильная, проблем не было. Рабочая ссылка: <a href=https:
GeraldZitlY, January 23rd, 2026
Дженерики купить в Санкт-Петербурге высокое качество по доступным ценам.Ознакомиться с ассортиментом и сделать заказ вы сможете перейдя по следующим ссылкам: https://generik78.ru/sialis/kupit-dzhenerik-sialis-80mg-v-sankt-peterburge https://generik78.ru/sialis/kupit-dzhenerik-sialis-40mg-v-sankt-peterburge https://generik78.ru/poppersy https://generik78.ru/dapoksetin/kupit-poxet-30-v-sankt-peterburge https://generik78.ru/sialis/kupit-sialis-80mg-v-sankt-peterburge
generik78.ru, January 23rd, 2026

Leave a comment

= Thanks for your comment =