Requested

Incremental Servo Pad Score 57

I have been using the servo Pad skill and wondering if there is a different style available. Rather than an absolute value on screen have circle pad x and y which the amount of movement from center controls how fast it moves and could be changeable. If you release it snaps back to middle position but stays at that location. The sabertooth skill (when calibrating) has basically what I'm talking about but only one axis at a time. On the typical vertical servo skill it moves very slowly which is fine going from 90 to 180 but when you go from 1000 to 60000 steps with stepper servo skill it's not very useful. In settings if you could make it changeable then it would also help.

*summary: a servo pad that can increment or decrement a servo position rather than moving it relative to the servo pad position.

Want to see this feature happen? Like it to increase the score.

ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

PRO
Synthiam
#1   — Edited

while that may be useful to you - I'll keep it on the list but in the meantime you could use the keyboard control to do the same thing. All you're wanting to do is increment or decrement a servo position.

Example Project

Here's an example project: Test increment decrement.EZB

User-inserted image

Description

Essentially you're looping to increment or decrement based on a key that is pressed. So you can add as many as you wish. Just make sure you read the notepad notes included in the project.

Code

Here is what the code looks like

// this is the amount we increment. doubled the longer the loop runs
var inc = 1;

// this is how many times the loop has ran so we know when to double inc
var incCounter = 0;

while (true) {

  // increment the servo by the value of inc
  Servo.increment(v0, inc);

  // pause a short time in the loop
  sleep(500);
  
  // keep track of how many times we have looped
  incCounter++;
  
  // for every 4 times we have looped, double the inc to move faster
  if (incCounter % 4 == 0)
    inc*=2; // double the increment amount
}

Notes:

Quote:

this demonstrates how to use the key control to increment or decrement a servo position by holding down a key.

a - increment servo V0, z - decrement servo V0.

Hold either A or Z down and the servo on V0 will move. Longer you hold it, the faster it will move.

The "key release" Script must be empty by having simply a comment in there. This is because otherwise the "key pressed" script will loop forever.

You can try this without an EZB connected and watch the Vertical servo robot skill move the values as you hold A or Z

#2   — Edited

Ooo I like it, Thanks DJ. I have been using the keyboard skill on other projects but not quite like this. The project that I did today was the stringers on the gantry. What is interesting on this one is that the x and y need to arrive at the same time so I had to do a lot of my programming with many variables. This allows me to just input rise and the run into variables as they are always different. I could have used the Auto Position skill but the problem that I find with that one is you can't change x axis by 12.507 inches and have it loop 17 times. There are the rise and run locations so 17x2=34  and I have the blade going down 25% on each pass back and forth so 34x4=136 frames in Auto position. Well you could but the program ends up being very long. If it were possible to make the item locations a variable in Auto Position that would be helpful, but can do it with typical Blockly programing of 1 1/2 pages. It is pretty cool to see this 16' gantry working and will post a picture in the near future.