После прочтения мануала
Что я делаю:
Сначала установил
Затем скопировал 99-pololu.rules в /etc/udev/rules.d/
Далее, все файлы из архива скопировал в папку /root/maestro_linux
После этого начинаю экспериментировать
Сначала запустил ./UscCmd ез параметров
Затем с параметром ./UscCmd --servo 0,1
А теперь не могу понять, почему серва сделала полный оборот?
Ещё пробовал управлять через bash
Здесь вообще никаких действий с сервой не происходило ...
Прошу помощи!
Что делаю не так?
Мне надо регулировать номером порта, углом поворота и скоростью
Раздел: Arduino и Raspberry Pi
Maestro Servo Controller Linux Software
[http://www.pololu.com/file/download/maestro-linux-100507.tar.gz?file_id=0J315]
(112k gz)
Что я делаю:
Сначала установил
sudo apt-get install libusb-1.0-0-dev mono-runtime libmono-winforms2.0-cil
Затем скопировал 99-pololu.rules в /etc/udev/rules.d/
Далее, все файлы из архива скопировал в папку /root/maestro_linux
После этого начинаю экспериментировать
Сначала запустил ./UscCmd ез параметров
root@raspberrypi:~/maestro_linux# ./UscCmd
UscCmd, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null
Select one of the following actions:
--list list available devices
--configure FILE load configuration file into device
--getconf FILE read device settings and write configuration file
--restoredefaults restore factory settings
--program FILE compile and load bytecode program
--status display complete device status
--bootloader put device into bootloader (firmware upgrade) mode
--stop stops the script running on the device
--start starts the script running on the device
--restart restarts the script at the beginning
--step runs a single instruction of the script
--sub NUM calls subroutine n (can be hex or decimal)
--sub NUM,PARAMETER calls subroutine n with a parameter (hex or decimal)
placed on the stack
--servo NUM,TARGET sets the target of servo NUM in units of
1/4 microsecond
--speed NUM,SPEED sets the speed limit of servo NUM
--accel NUM,ACCEL sets the acceleration of servo NUM to a value 0-255
Select which device to perform the action on (optional):
--device 00001430 (optional) select device #00001430
Затем с параметром ./UscCmd --servo 0,1
На экране:
Setting target of servo 0 to 1...
В реале:
Серва сделала полные 120 градусов и стала удерживать положение (при повороте вручную - включается серва в обратную сторону).
Для отключения использую команду
./UscCmd --servo 0,0
А теперь не могу понять, почему серва сделала полный оборот?
Ещё пробовал управлять через bash
#!/bin/bash
# Sends a Set Target command to a Pololu Maestro servo controller
# via its virtual serial port.
# Usage: maestro-set-target.sh DEVICE CHANNEL TARGET
# Linux example: bash maestro-set-target.sh /dev/ttyACM0 0 6000
# Mac OS X example: bash maestro-set-target.sh /dev/cu.usbmodem00234567 0 6000
# Windows example: bash maestro-set-target.sh '\\.\USBSER000' 0 6000
# Windows example: bash maestro-set-target.sh '\\.\COM6' 0 6000
# CHANNEL is the channel number
# TARGET is the target in units of quarter microseconds.
# The Maestro must be configured to be in USB Dual Port mode.
DEVICE=$1
CHANNEL=$2
TARGET=$3
byte() {
printf "\\x$(printf "%x" $1)"
}
{
byte 0x84
byte $CHANNEL
byte $((TARGET & 0x7F))
byte $((TARGET >> 7 & 0x7F))
} > $DEVICE
Здесь вообще никаких действий с сервой не происходило ...
Прошу помощи!
Что делаю не так?
Мне надо регулировать номером порта, углом поворота и скоростью
Раздел: Arduino и Raspberry Pi