Comments (9)
The ms-8ch-servo
device in /sys/class/lego-sensors/
is the controller itself. And yes the only useful thing there is the battery voltage.
There should also be 8 devices in /sys/class/servo-motor/
. These are are used to actually control the motors.
I don't know if the demo has anything implemented for the servo-motor class or not.
from ev3dev-lang.
I don't see anything.
Thanks for the quick answer. It works like a charm using /sys/class/servo-motor/
For information, we need to use 2 servos and try to finish to build our secondary robot this week-end. The French cup of robotic will occure in mid-May, and I will promote ev3dev ;)
from ev3dev-lang.
There is a servo motor test in ev3dev-lang-test.cpp. It does not do much, just dumps the motor's properties. Does it work for you?
from ev3dev-lang.
Yes, it works and it shows information about connected servomotors. I'm going to work now on our program in C++ using ev3dev.cpp and I will check if I can add a test to move servos in ev3dev-lang-demo.
from ev3dev-lang.
I did'nt succeed to drive several servos using ev3dev.h. The code from ev3dev-lang-test just detected only the first servo.
Have you got a small test to show me how to control several servos using ev3dev.h ?
For information, servos are working using shell command on /sys/class/servo-motor/.
from ev3dev-lang.
I don't have any experience with servo motors, but the code in the demo does not specify an output port to use. So its happy with the first servo motor it sees. Did you try to specify an output port, as in
m1 = servo_motor(OUTPUT_A);
m2 = servo_motor(OUTPUT_B);
?
from ev3dev-lang.
I use January version of ev3dev.
In fact, servo_motor() don't take OUTPUT_X, but the id (0 to 7) of the servo, but it doesn't work.
from ev3dev-lang.
The argument for servo_motor
is the port name. You can find the port name by reading the port_name
attribute. It should be something like in1:mux1
.
from ev3dev-lang.
It's working ! with in[ev3port_name 1-4]:sv[servo ID 1-8]
Example :
servo_motor m_;
m_ = servo_motor("in3:sv1");
m_.set_position(50);
from ev3dev-lang.
Related Issues (20)
- Updating human-readable spec HOT 25
- How to create spec.json HOT 2
- How strictly to follow the language binding specification? HOT 6
- How to implement Button Class HOT 1
- How to use with the autogen system? HOT 26
- Unified language for Java - Library Submission HOT 5
- Having issue to connect Pycharm to the Brick HOT 3
- Standardize "systemDeviceNameConvention"
- Add binding for IR-SEEK to spec HOT 1
- Javascript motor and sensor example HOT 3
- A question about sensor inherits HOT 5
- 0.9.3? HOT 1
- Merge NXT Motor and Large Motor classes
- Some typo on the driver docs HOT 3
- stop lcd going back to menu HOT 2
- Dual motors HOT 2
- UNMET PEER DEPENDENCY bluebird@~3.5.0 HOT 7
- Buttons Error (platform-gpio-keys.0-event not found) HOT 3
- HiTechnic Compass Sensor "Device is not connected" HOT 3
- Status of the project - current ev3dev bindings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ev3dev-lang.