|
Re: Setting up a Victor 888 with an arduino
I am a newbie when it comes to arduino programming, or any programming for that matter, but I was able to make a Victor work somewhat. It actually ran a small motor in both directions with sort of jerky speed control.
I used "include <servo.h> which pulls in the servo function from the library.
I used "myservo.attach(9)" so set the output on a PWM pin.
I also used the "map" function to convert joystick values to the 0 to 180 that the Victor needs. This is key.
I used myservo.write(val) to send the value to the Victor.
I hesitate to upload the whole code because I have included a lot of junk to overcome a very noisy and non-linear joystick.
Hope this helps.
|