Page 194 - Amphibionics : Build Your Own Biologically Inspired Robot
P. 194
Amphibionics 05 3/24/03 8:44 AM Page 173
Chapter 5 / Serpentronic: Build Your Own Robotic Snake
second set of positions in Table 5.7. Frame number 4 shows the
body segment positions that correspond to the second set of posi-
tions in Table 5.7. When the sequence is running, the body moves
in a sine wave pattern. For the snake to continue moving forward,
this entire sequence repeats. In the control program, the servo
positions only need to be set twice, and then the sequence repeats.
If you wish to experiment, you could program sequences with
more intermediate positions for a smoother sine wave.
Body Position 1 TABLE 5.7
Servo Position Values
Servo and port address Pulsout value
to Sequence Forward
Movement of the Snake
1—PortB.2 157
2—PortB.3 210
3—PortB.7 143
4—PortB.6 100
5—PortB.5 157
6—PortB.4 210
Body Position 2
Servo and port address Pulsout value
1—PortB.2 143
2—PortB.3 100
3—PortB.7 157
4—PortB.6 210
5—PortB.5 143
6—PortB.4 100
173