Source

servo /

Filename Size Date modified Message
Servo
114 B
16.8 KB
839 B
477 B
2.4 KB
7.2 KB
9.0 KB
547 B
483 B
288 B
292 B
11.0 KB
1.4 KB
7.4 KB
28.6 KB
4.1 KB
pinout is (from left to right)
1 +5v (connect to pin 8 of db9 on motor 1)
2 encoder x1 (connect to pin 1 of db9)
3 encoder y1 (connect to pin 5 of db9)
4 encoder x2
5 encoder y2
6 gnd (connect to pin 9 of db9 on motor 1)


query commands:
?c		Display counters
!c		Clear counters

?m		Motor outputs

!g 1 100	Move at speed 100 (open loop)

# Disable pulse mode
^pina 1 0
^pina 2 0

# Enable encoder mode
^emod 1 17	Enable counter 1 as feedback for motor 1
^emod 2 33	Enable counter 2 as feedback for motor 2
~mmod		Query mode
^mmod 1 3	enable closed loop mode?



however, using the software to configure
^mmod 1 4
~emod 1 18
^mmod 2 4
~emod 2 34

# watchdog timeouts must be disabled in closed loop mode!
# otherwise it will return to home all the time
^rwd 0

# Write to the EEPROM
%eesav

# Slow down the accel
^mac 1 5000
^mdec 1 5000