blob: f7aed7ade1025678974c59f90e12bf9e11c0c4c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
echo "Makes the X and Y Steppers do a square ad infinitum"
export pokeDev=/dev/ttyUSB0
# Add your "poke" command here.
export poke="./poke -t $pokeDev -v -d "
export xaxis=2
export yaxis=3
export slp=4.8
export spd=220
# Ensure port is raw data friendly.
stty -F $pokeDev -echo -cooked
echo 3 0 0 | $poke $xaxis
echo 3 0 0 | $poke $yaxis
while true; do
echo 5 $spd 0 2 | $poke $xaxis
sleep $slp
echo 5 $spd 0 2 | $poke $yaxis
sleep $slp
echo 5 $spd 0 0 | $poke $xaxis
sleep $slp
echo 5 $spd 0 0 | $poke $yaxis
sleep $slp
done
|