Hardware Reference
In-Depth Information
Counterclockwise rotation of the stepper motor
1.
The counterclockwise rotaion is achieved by reversing the order of energizaion.
In the first step, Lead 1 is energized, which is followed by Leads 1 and 2. The table
for counterclockwise rotaion is shown as follows:
Lead Wire
Color
CCW Direction
1
2
3
4
5
6
7
8
1 BLU
- -
2 PIK
- -
-
3 YEL
- - -
4 ORG
- - -
2. Hence, the code for the first step will be as follows:
digitalWrite(motorPin1, HIGH);
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(motorSpeed);
Objective complete - mini debriefing
If you are not familiar with stepper motors and their control
techniques, there are abundant resources and one such
resource is http://www.societyofrobots.com/
member_tutorials/node/314 .
We discussed the stepper motor control technique using the Arduino microcontroller.
Once we have discussed the prerequisites, we will take this code sample and build things
around it.
Controlling the RGB LED Strip using
the Arduino
We depict the mood of the weather forecast by using RGB LED lighing. We indicate cold
weather indicaions with blue color lighing, fair weather condiions with green lighing,
and warm/dangerous weather condiions using red lighing. In this secion, we will look
into controlling an RGB LED using the Arduino.
 
Search WWH ::




Custom Search