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 >
Мой город https://yuristi.com/blog/advokat-24-7-v-moskve-srochnyj-vyezd Юридические услуги • Правовая помощь • 4) защита прав потребителей (в части предоставления коммунальных услуг); Ольга Хонина https://yuristi.com/blog/advokat-po-ugolovnym-delam-chto-skazat-po-telefonu Юридические услуги • Юридическая консультация • Защита прав потребителей https://yuristi.com/advokat-po-107 Акция «Счастливые часы» Бухгалтеры всегда на связи, можно быстро… График предварительной записи:
Irvingnurib, November 13th, 2026
Пример, запрос <>ецепт пиццы моцарелла] — является геонезависимым, то есть неважно, откуда его задают — сайты в Яндексе будут отображаться одинаковые из всех регионов https://proffseo.ru/privacy Или запрос <>илеты в театр Москва] — пользователь четко указывает, где именно его интересует заказ билетов в театр https://proffseo.ru/prodvizhenie-angloyazychnykh-sajtov Поэтому, даже если такую фразу вводят в Питере — человека интересует именно московский театр и сайты ему нужно показать московск
Buddybak, November 13th, 2026
<a href=https://dog-house.sbs/>dog house megaways бк</a> https://dog-house.sbs <a href=https://dog-house.sbs/megaways>слот dog house</a> https://dog-house.sbs <a href=https://dog-house.sbs/megaways>the dog house demo megaways без верификации</a> https://dog-house.sbs <a href=https://dog-house.sbs/megaways>казино собачки демо</a> https://dog-house.sbs <a href=https://dog-house.sbs/>demo the dog house дог хаус</a> https://dog-house.sbs dog-house.sbs
NouiTar, November 12th, 2026
Разобраться в новой теме обычно мешает не недостаток информации, а её избыток. С tripscan история та же: вокруг много разрозненных заметок и советов, а понятной картины не складывается. Поэтому начнём с простого — с того, что действительно важно. Суть сводится к нескольким пунктам. Такой <a href=https://tripscan87.com>trip81 at</a> сервис помогает искать <a href=https://trip-89.at>trip79 co</a> и сравнивать варианты поездок, не переключаясь между десятками вкладок. Пользователь получает сво
SamuelReign, November 12th, 2026

Leave a comment

= Thanks for your comment =