User Manual
217
/
223
We are using 4 pins to control the Stepper and 1 pin for the IR sensor.
Pins 8-11 are controlling the Stepper motor and pin 12 is receiving the IR
information.
We connect the 5V and Ground from the MEGA2560 to the sensor. As a precaution,
use a breadboard power supply to power the stepper motor since it can use more
power and we don’t want to damage the power supply of the MEGA2560.
Code
After wiring, please open program in the code folder- Lesson 32 Controlling Stepper
Motor With Remote and click UPLOAD to upload the program. See Lesson 2 for
details about program uploading if there are any errors.
Before you can run this, make sure that you have installed the < IRremote >
< Stepper >library or re-install it, if necessary. Otherwise, your code won't work.
For details about loading the library file, see Lesson 1.
The code only recognize 2 values from the IR Remote control: VOL+ and VOL-.
When VOL+ is pressed on the remote the motor will make a full rotation clockwise.
VOL- will make a full rotation counter-clockwise.
Example picture










