Pages: [1]   Go Down
Author Topic: stepper motor example code  (Read 369 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I have a stepper motor

http://s4.electrodragon.com/wp-content/uploads/2012/03/5V-4-phase-5-wire-stepper-motor-gear-motor-28BYJ-48-5V.jpg


and I'm trying to learn how to program it to turn.

I wonder if someone could write me a simple code that rotates the motor 45 degrees right and then back, and then it stops. I have tried with alot of example codes but i don't get the structure of them.


Would really appreciate if someone could write a simple test code doing the above.

Thanks in advance
Logged

Offline Offline
Faraday Member
**
Karma: 100
Posts: 5982
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Googlr "arduino"  stepper motor example

We don' t do your homework

If you are trying to learn you are not trying hard enough if you haven't googled anything and ask us to do it for you.
« Last Edit: May 01, 2014, 12:44:33 pm by raschemmel » Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

UK
Offline Offline
Tesla Member
***
Karma: 135
Posts: 7645
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be even more specific and Google Arduino 28BYJ stepper motor.

There are lots of Threads on the Forum about those motors.

...R
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1926
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Lot of information on Steppers and pointers to example code on the ArduinoInfo.Info WIKI HERE:
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Faraday Member
**
Karma: 100
Posts: 5982
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.codeproject.com/Articles/699986/An-Arduino-Library-to-Control-the-BYJ-Stepper   
Logged

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Pages: [1]   Go Up
Jump to: