Hardware Reference
In-Depth Information
Figure 4-9. Model of a bipolar stepper motor
In Example 4-4 ( bipolarStepperMotor.js ), the states variable is an array of the four dif-
ferent states listed in the previous paragraph. That is, [1,0,0,0] instructs to turn on
coil 1 in the forward direction. After it's been on for a while, you move to the next state,
[0,1,0,0] . This turns off coil 1 and turns on coil 2. Then you go to [0,0,1,0] ,
which turns on coil 1 in reverse, and so on. The H-bridge (see Recipe 4.3 ) takes care of re-
versing the coil:
Search WWH ::




Custom Search