Thumbnail

Key Control

How to add the Key Control robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Remote Control category tab.
  5. Press the Key Control icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Key Control robot skill.


How to use the Key Control robot skill

Use this control to assign scripts to keyboard shortcuts. Any key can be assigned a Script command. By default, the arrow keys control any movement panel you have added to the project. If you press the UP arrow, the forward direction of the current movement panel is executed. If you press the Down arrow, the reverse direction of the existing movement panel is executed.

If you want to configure scripts to execute for any keys other than arrow keys, you can do so in the configuration menu of this script. You can add a script for when a key is pressed and another for when the key is released. When viewing the configuration menu, you can add keys by typing the single letter of the key into the grid. Next to it, on the same row, are the scripts for pressing and releasing the key.

*Note: This control only responds to shortcut keys in foreground Focus. You must click on the control with your mouse to bring it into Focus before it responds to shortcuts. When the robot skill is in the foreground, it turns green. When it is green, the robot's skill is listening to shortcut keys.


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

#1  

Is this still a valid skill? I don't see it in the Navigation tab. Has it been moved?

#2  

Never mind. I found it under "Scripting".

(You really need to hire me to test your software!)

--Thomas

PRO
Synthiam
#3  

We just moved it today for the next update. There's a few skills moving that will be in the next build.

#4   — Edited

Have been trying different ways to get the arrow keys to work but since it only takes 1 letter etc there is no way to enter uparrow or up. The up and down arrows would be really nice to have them working. The rest of it works really nice!

Oops missed the part where the arrow keys move the movement panel. I have to admit that I build a lot of things without reading the directions and then read the directions if I get stuck, my bad.

#5  

@Athena Is there a way to access the script that is happening behind the scenes of the key control skill for the arrow keys?

PRO
Canada
#6  

I'm glad you found the functionality you were looking for with the arrow keys controlling the movement panel. Regarding your question about accessing the script behind the Key Control skill, I'm not able to help with programming or provide access to the underlying scripts of robot skills. However, the Key Control skill is designed to work seamlessly with the movement panel, and the arrow keys are pre-configured to send the appropriate movement commands (Forward, Left, Right, Stop, Reverse) to the Movement Panel without the need for user intervention or script editing.

If you need to create custom behaviors or responses to key presses, you can assign your own scripts to other keys using the Key Control skill. This allows you to define specific actions when a particular key is pressed. Remember to click on the control with your mouse to bring it into focus before it responds to shortcuts.

For any further customization or if you're looking to create a new robot skill that requires programming, you can refer to the guide on creating robot skills here: https://synthiam.com/Support/Create-Robot-Skill/Overview. This guide provides information on how to develop your own skills using the Synthiam ARC platform.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#7   — Edited

I can move my steppers just fine with a script for the down pressing or release of a certain key, but since I can't access the script of the release arrow I can not get it to stop properly. It would be nice to have those arrow keys have the same access to down and release scripts. I am using the Auto Position movement panel, oh well guess I will just have to use other keys.

Update: I have tried putting in a script for the Stop action in Auto Position that I use for the release key but it still does not stop it.

PRO
Synthiam
#8  

@Athena explain in more detail to automation man what the arrow keys do in this robot skill.

PRO
Canada
#9  

The Key Control skill in Synthiam ARC is designed to allow you to assign custom scripts to keyboard keys, enabling you to control your robot with keyboard input. By default, the arrow keys are pre-configured to control the movement of your robot through the current Movement Panel added to your project. Here's how the arrow keys function within the Key Control skill:

  • Up Arrow: Executes the "Forward" command, instructing the Movement Panel to move the robot forward.
  • Down Arrow: Executes the "Reverse" command, instructing the Movement Panel to move the robot in reverse.
  • Left Arrow: Executes the "Left" command, instructing the Movement Panel to turn the robot to the left.
  • Right Arrow: Executes the "Right" command, instructing the Movement Panel to turn the robot to the right.

These arrow key commands are integrated with the Movement Panel and do not require additional scripting for basic directional control. However, if you are using a Movement Panel that supports stopping the robot, such as the Auto Position Movement Panel, you can assign a script to the "Stop" action within the Movement Panel's configuration. This script will be executed when the robot needs to stop moving.

If you need to stop your robot's movement, especially when using stepper motors, you may need to create a custom script that sends the appropriate command to stop the steppers. You can then assign this script to a key of your choice (other than the arrow keys) using the Key Control skill.

For the arrow keys, there is no direct access to modify the scripts associated with their press and release actions within the Key Control skill. The arrow keys' behavior is fixed to control the Movement Panel's directional commands. If you require custom behavior upon key release, you will need to use other keys and assign your custom scripts to both the press and release actions for those keys.

Remember, the Key Control skill must be in focus (indicated by a green border) for it to respond to key presses. Click on the Key Control skill window to bring it into focus before using the keyboard shortcuts.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#10  

Ok I appreciate the insight on how the arrow keys worked it helps me understand it. How would you write the scripts in Blockly to control the movement panels of steppers. I can do it but I need it to notice the release of the arrow or other keys to make it acknowledge its location and stop it. Steppers are a bit different animal than typical servos with many other features to deal with.

PRO
Synthiam
#11  

If that's the case - maybe you want to use a custom movement panel. That way, you can add your code to each movement. The custom Movement Panel v2 is a good one. @Athena can provide a link and more details for you. FYI, further conversation about the custom Movement Panel should be done in its thread or a new question with the robot skill selected.

PRO
Canada
#12  

The Custom Movement Panel v2 in Synthiam ARC allows you to define custom scripts for each direction of movement,including the stop action. This means you can create scripts that will be executed when a specific movement command is issued, such as moving forward, turning, or stopping. You can use this feature to control stepper motors by writing scripts that send the appropriate commands to the stepper motor controller.

To use the Custom Movement Panel v2, you can follow these steps:

  1. Add the Custom Movement Panel v2 to your ARC project.
  2. Click on the gear icon to open the configuration menu for the Custom Movement Panel v2.
  3. In the configuration menu, you will see fields where you can enter scripts for each direction (Forward, Left, Right, Reverse, Stop, etc.).
  4. Write your custom scripts for each direction, including the stop action. For stepper motors, you will need to send the appropriate commands to start, change direction, and stop the motors.
  5. Assign the scripts to the respective movement commands.

With the Custom Movement Panel v2, you have full control over what happens when each movement command is issued. This allows you to integrate the movement of stepper motors into your robot's behavior seamlessly.

For more information and to add the Custom Movement Panel v2 to your project, you can visit the following link: https://synthiam.com/Support/Skills/Movement-Panels/Custom-Movement-Panel-v2?id=21148

Please note that further discussions about the Custom Movement Panel should be directed to its dedicated thread or a new question with the robot skill selected, as DJ Sures mentioned.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.