Steve Thurston
Australia
Requested
— Edited
WISH LIST - Auto Connect Check Box And Servo Buttons Score 1439
Hi guys,
I can't find a wish list area, so I'm posting this here. If there is a wish list area, please move this post there.
I would like to see an Auto Connect checkbox in the connections setup. and a Min and Max buttons and slide bar added to servo Controls, is this possible?
Thanks for listening Steve
Want to see this feature happen? Like it to increase the score.
Related Hardware LattePanda
Related Control
Horizontal Servo
Hi Steve,
I'm not sure what your skill level is with ARC or ARC. I'll assume a beginner to simplify my explanation to follow. If you already know this please forgive.
As far as the Auto Connect, what is your need to have that button on the connection control? Is it to auto connect when your projects starts up? Usually if builders want the project to auto connect they place ControlCommands in a INT Script and start the project from a shortcut from windows desktop. There is a tool on the Builder and ARC top menu to make a shortcut that will start the INT Script when the program opens. It's under the Options tab and called Shortcut Creator.
Inside the INT script you can start up the connection process and start ans set all kinds of other devices. I connect all 4 of my EZB's, set Varables, set servo speeds and positions and initiate my serial ports along with a ton of other things. After the INT Script finishes my robot is connected and ready to run.
If you are looking to just connect one EZB after the project loads you can just click the connection button that is already on the Connection Control. If you want to connect several at the same time you can write a script and place the commands in it for one click connection. Like this:
Here is what parts of my INT Script look like:Now, the servo Control does have a slide on it. It's the green double direction arrow in the top left corner. You put your cursor on it, hold down left button on your mouse and drag it back and forth. Click the right button and you will get a list of numeric positions you can pick. However I do like the idea of a visible slide bar. I've always found the present virtual slider kinda hard to work. I'll stop here. I hope this helps somehow. Happy building.
I like your Ideas, but the best is the servo Idea, with a Min and Max slider, I never liked the way it was originally when you have a Inmoov that has close to 40 servos, the way it is now is a royal pain, I always wondered why there wasn't a slide bar. That is a great Idea. lets hope they add this feature.
..or something with a visual representation of position/angle and min and max positions. Position could be controlled by slider OR rotating the virtual servo horn.
In general I'd like to see a make over and update to controls specific to servos and animation, like Flowbotics.
@Dave Schulpius Hi mate, Thanks for your reply. I'm as newb as it gets, and you should never apologize for dummying down an answer or question, there is always someone who will learn from basics, but fewer that will learn from to techy answers.
I'm using is a : LattePanda with Leonardo on comm5 - (EZ-Genuino_Leonardo-636967356658216814.zip) Arduino mega on com7 - (EZ-Mega-v1-636848729355769322.zip) ARC - (2020-03-19 - so I could create a shortcut)
The reason for an Auto Connect box next to each board connection is because it can't get any simpler than checking a box to automatically connect on startup, and it would be in your face, so it would stop anyone else wondering how to autoconnect once a project opens.
I have created a script I called "STARTUP" on the ARC desktop to connect each board and set servos
ControlCommand( "Connection", Connect0) #To connect LattePanda Leonardo Sleep(200) ControlCommand( "Connection", Connect1) #To connect Arduino Mega Sleep(500)
Servo(1,D4, 0) Servo(1.D5, 0) ServoSpeed(1.D4, 0) ServoSpeed(1.D5, 10) Servo(1,D4, 90) Servo(1.D5, 90)
Clicking start in the control connects each board and moves the servos to 90 degrees, but speed doesn't seem to do anything, not sure why, all my searches indicate I have used the correct command "ServoSpeed", as you have also instructed, or does it only work on IoTiny and EZ-Bv4 ?
The servo buttons (I have created script collections, which work great) but to make it easier to move a servo from the servo control, I find the mouse click drag hard to use, maybe partly because I'm using a keyboard with touch pad. and the drop down percentage box (because I have min =1 and max 180) it involves scrolling each time I want to set the min or max position. buttons and slider would make it so much easier and quicker. ( I want to look into how to create controls eventually, but atm I have to many basics to learn, Controlling Camera, mic, Motors, Neopixels etc)
I have created a shortcut, (Which autostarts my "AZ.EZB" (Yer I know its a really creative name lol) it Starts ARC, Opens Project, Connects the 2 connections and moves servos, but speed still doesn't seen to work.
Any other basic tips would be great ;-)))
Cheers mate Steve
ServoSpeed (servoPort, speed) Set the speed of servo or PWM. This is the speed to move between positions. The servo speed is a number between 0 (fastest) and 10 (slowest) *Note: To initialize the ServoSpeed() at first use, set a Servo() position before using the ServoSpeed() command. If there is no previous position (such as during power-on), the software assumes the position is 0 and will cause issues with your robot. *Note: Once the ServoSpeed() has been initialized the first time, specify the ServoSpeed() before specifying the Servo() position. Example: ServoSpeed(D14, 25)
I assume you have more then one controller because you have a 1 at the start of each command? Also in this command "Servo(1,D4, 90)" you have a comma behind the 1 instead of a period. It should like this: Servo(1.D4, 90)
Try this in your first start up script. You may or may not need the Sleep commands. If you do need the sleep commands you may have to make them longer so the next command has time to process:
Hi Dave
I do actually have commas, I guess I fat fingered when typing in comment.
I updated start script with Sleep(500) and still not working.
I think Ive found the problem thou, I tried ServoSpeed on my EZ-Bv4 and it works fine, but on the LattePanda (built in Leonardo and the Mega on the 2nd com port) ServoSpeed doesnt seem to work, does this sound possible?
Software/Drivers used: LattePanda with Leonardo - (EZ-Genuino_Leonardo-636967356658216814.zip) Arduino mega on 2nd com port - (EZ-Mega-v1-636848729355769322.zip) ARC - (2020-03-19)
Thanks Steve
I believe the only controller that supports a servospeed on Pwm servos is the ezrobot ezb b4 and ezrobot iotiny. Dynamixel servos do support that feature independent of the controller, however.
Hi DJ
Bummer Is there a way of slowing down a servo in Java on a Leonardo and mega?
Will moving 1 degree at a time going to cause a problem?
You can use the Servo.increment() in JavaScript in a loop with a short sleep() after each command
im on my phone so I’ll try to type and example for you ...