But if I try to use the diyServo service as described in http://myrobotlab.org/service/diyservo it won’t work. I have looked for hours at the source of MyRobotlab now, but I have no clue what I am doing wrong. Or is the shield completely different compared to the one used in the samples?

It's possibility that You have Fake chips on board i have these same. On about 20 shields only 3 works full. I have buy new chips and resoldered it now it's working.
Or You have other problem, but check first it is working on simple PWM mode and arduino.

If you just want to use it as a motor you should just use the MotorDualPwm service. The DiyServo service is when you want to use the motor as a Servo, i.e when you also connect a potentiometer as a position feedback.

servo.attach(arduino, pin) is there to specify what analog pin you are using for the positional feeback ( the potentiometer ).

The shown arduino code works fine so I think the shield is OK.
This shield is propably not compatible with the MotorDualPwm service.

I have tried your code also on a mega, but it still does not work.
As you can see in the arduino code the shield expects a HIGH or LOW on pin M1INA en M1INB for direction while you are describing analog values. and pin M1PWM expects a value between 0 and 255 for speed value.

I think I need a special versie of het motor service.
Do you have a suggestion where and how to start?
Which motor service comes close to inherrit from?
(I am a novice in these kind of programming...)

I think the Motor service is the one you want to copy, because it uses both Digital and Analog pins, while MotorDualPwm only uses Analog pins.

If you want to learn how to develop services yourself, we will try our best to help you..

The first step would be to download Eclipse, the development tool that we are using to develop services. Most of the code in MRL is Java. We use Java 8. Download Eclipse for Java developers from here: http://www.eclipse.org/downloads/eclipse-packages/

It contains Eclipse + Java + git ( version control ) + some other goodies.

Next step is to download MRL itself. You can find how to do that here:

When you have MRL installed and runnning in Ecipse, the next step is to find the service to copy.

You will find the Motor service in the same folder as the Runtime service, that you now hopefully can use to start MRL with.

Copy if to the same folder and give it a new name.

Most of the methods are defined in AbstractMotor and inherited to the Motor service. So the code in the Motor service is not that big. You need to change it so that you can use the 3 pins of the motor driver you have.

You also need to make some changes to the Arduino code, since it's aware of the different motortypes, Search for Motor, and you will find the different areas that needs to be updated.

If you want to do it all the way, then a few other things also need to be done, like a swing GUI, a Web GUI, create a service page, an example and in best case also a unit test. But that can wait. Many services are missing all those parts.

My internet connection is always good and stable and there is no proxy server.
I did disable my virusscanner and tested it also without any result.
When I "Install All" from the latest build downloaded from MyRobotLab.org everyting goes smoothly.

Perhaps I have to change something in the build.xml file?? or something else?

I did clone the source from GitHub to c:\mrl. But also then it is not possible to generate a jar with all services (actually a jar able to install all services).

I am working direct in eclipse now and for now that will do.

But that leads me to another problem. I would like to use your diyServo-source as a basis for developing a servo-service that supports the VNH5019 dual motor driver with an external encoder. However the source of your diyServo-service is not part of the cloned source. (I see no diyServo.java).

Is your source not published yet? Is it possible to send me this source?

Making a version of the diyServo service for the VNH5019 dual motor controller also using a encoder and a endswitch, is going quit well and the DC-motor is acting as a servo, but… when it runs I get a lot of “Ack not received” errors.

After such an error connection with the encoder is gone. So the motor runs for always!
I tried to change the pin-rates, disabled pins, ect, etc, without any success.