Vicent
2018-11-28 22:14:42 UTC
Hi,everyone.
I'm trying to control a sd90 servo with arduino using octave, but I don't
now what I'm missing.
I have octave 4.2.2 in Ubuntu. arduino 1.8.6 but not installed only
downloaded but it works well
package octave- arduino 0.3.0 instrument-control 0.3.1
I can detect the arduino and put digitals pins to on or off but when I try
to use the servo I only get error messages. I don't know why I can't
initialize the servo object.
This is my testing program and the result in command window:
#testing program arduino-servo
1 pkg load arduino
2
3 ar = arduino("/dev/ttyACM0","Uno","Libraries","servo")
4
5 % get the pin names
6 pins = ar.availablepins;
7 writeDigitalPin (ar, "d13", true);
8 #pause (2)
9 value1 = readDigitalPin (ar, "d13")
10 writeDigitalPin (ar, "d13", false);
11 #pause (2)
12 value2 = readDigitalPin (ar, "d13")
13 value3 = readVoltage (ar, "a0")
14
15 myServo = servo(ar, "d9", "minpulseduration", 1.0e-3,
"maxpulseduration", 2e-3);
16
17 writePosition (myServo, 0.5);
----------
Result on Command Window
arduino object with fields of:
port = /dev/ttyACM0
board = uno
libraries = {
servo
}
availablepins = {
d0 - d13
a0 - a5
}
value1 = 1
value2 = 0
value3 = 2.4536
error: sendCommand: failed err=10: msg=Unknown cmdID
error: called from
sendCommand at line 72 column 5
servo at line 119 column 3
provaArduino at line 15 column 9
-------
Thanks for your help
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
I'm trying to control a sd90 servo with arduino using octave, but I don't
now what I'm missing.
I have octave 4.2.2 in Ubuntu. arduino 1.8.6 but not installed only
downloaded but it works well
package octave- arduino 0.3.0 instrument-control 0.3.1
I can detect the arduino and put digitals pins to on or off but when I try
to use the servo I only get error messages. I don't know why I can't
initialize the servo object.
This is my testing program and the result in command window:
#testing program arduino-servo
1 pkg load arduino
2
3 ar = arduino("/dev/ttyACM0","Uno","Libraries","servo")
4
5 % get the pin names
6 pins = ar.availablepins;
7 writeDigitalPin (ar, "d13", true);
8 #pause (2)
9 value1 = readDigitalPin (ar, "d13")
10 writeDigitalPin (ar, "d13", false);
11 #pause (2)
12 value2 = readDigitalPin (ar, "d13")
13 value3 = readVoltage (ar, "a0")
14
15 myServo = servo(ar, "d9", "minpulseduration", 1.0e-3,
"maxpulseduration", 2e-3);
16
17 writePosition (myServo, 0.5);
----------
Result on Command Window
provaArduino
ar =arduino object with fields of:
port = /dev/ttyACM0
board = uno
libraries = {
servo
}
availablepins = {
d0 - d13
a0 - a5
}
value1 = 1
value2 = 0
value3 = 2.4536
error: sendCommand: failed err=10: msg=Unknown cmdID
error: called from
sendCommand at line 72 column 5
servo at line 119 column 3
provaArduino at line 15 column 9
-------
Thanks for your help
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html