Bescor MP-101 and Arduino v3.0

Update: The map function utilizes the Nunchuck’s full range to the Bescor speed.

mapx = map(absx, 0, 100, 0, 115);

3 Comments

  1. Like many, I am a beginner and trying to learn!

    I am wondering how you came up with the need to change the frequency of the PWM and why you chose 30.64 (if I understand the PWM Cheatsheet correctly http://playground.arduino.cc/Main/TimerPWMCheatsheet ).

    I am trying to control the Bescor with a Particle Photon (no Nunchuck) and believe I need to change the PWM frequency for that device just as you did with the Arduino. While I figure out how to do that, I would like to understand how you determined to do this for the Arduino.

    For the record, I implemented your code on an Arduino Uno with great satisfaction!

    Thank you.

    Reply
    • I chose 30.64 based on noise and performance, but for the best results, I want to try using a digital potentiometer. The original controller used a resistance slider which we could simulate using the proper digital pot.

      Reply
  2. Great code!

     

    Thanks

    I got some more control….  i need some very subtiles movements but some time faster ones… so:

    4 speed with C and Z Buttons

    int buttonC = chuck.buttonC;
    Serial.println(buttonC);
    int buttonZ = chuck.buttonZ;
    Serial.println(buttonZ);

    // Map the x/y value to get the full range

    if (buttonZ == 0 && buttonC == 0)
    {

    mapx = map(absx, 0, 100, 0, 60);
    mapy = map(absy, 0, 100, 0, 60);

    }
    if (buttonZ == 0 && buttonC == 1)
    {
    mapx = map(absx, 0, 100, 0, 100);
    mapy = map(absy, 0, 100, 0, 100);
    }

    if (buttonZ == 1 && buttonC == 0)
    {
    mapx = map(absx, 0, 100, 0, 150);
    mapy = map(absy, 0, 100, 0, 150);
    }
    if (buttonZ == 1 && buttonC == 1)
    {
    mapx = map(absx, 0, 100, 0, 220);
    mapy = map(absy, 0, 100, 0, 220);
    }

     

     

     

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *