How to add the Sketch Pad robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Scripting category tab.
- Press the Sketch Pad 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 Sketch Pad robot skill.
How to use the Sketch Pad robot skill
There are so many ways to present visual feedback with this skill. The Sketch Pad allows you to draw with controlCommand() from a script. You can create scripts that draw object locations in a room or display information from the path the robot has driven. You can also display custom face emotions using simple graphic shapes of circles, squares, and rectangles. Use your creativity to visualize robot data!*Note: For usage information, reference ARC's example folder for a SketchPad project.
Main Window
1. Sketch Display
This displays the graphics that are executed in code.
2. Script
This skill executes scripts that can draw graphics to the Sketch display.
How to use Sketch Pad
1) Add the Sketch Pad skill to your ARC project (Project -> Add Skill -> Scripting -> Sketch Pad).
2) Add the Script skill to your ARC project (Project -> Add Skill -> Scripting -> Script).
3) Write a script in the script skill to draw a graphic. Javascript Example: controlCommand("Sketch Pad", "CanvasDrawCircle", 3, 50, 50, 50, 50, "purple");
4) Run the script and watch as the graphic is drawn in the Main Window of the Sketch pad.
Control Commands
Several control commands can be used to draw on the canvas for the sketch pad. Here is the list of control commands for the sketch pad...
- ControlCommand("Sketch Pad", "FullScreen")
- ControlCommand("Sketch Pad", "RestoreScreen")
- ControlCommand("Sketch Pad", "FullScreenToggle")
- ControlCommand("Sketch Pad", "CanvasDrawCircle", [Thickness], [X1], [Y1], [X2], [Y2], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawCircle", [Thickness], [X1], [Y1], [X2], [Y2], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawCircle", [Thickness], [X1], [Y1], [X2], [Y2], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawCircleFill", [X], [Y], [Width], [Height], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawCircleFill", [X], [Y], [Width], [Height], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawCircleFill", [X], [Y], [Width], [Height], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawLine", [Thickness], [X1], [Y1], [X2], [Y2], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawLine", [Thickness], [X1], [Y1], [X2], [Y2], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawLine", [Thickness], [X1], [Y1], [X2], [Y2], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawPixel", [X], [Y], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawPixel", [X], [Y], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawPixel", [X], [Y], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawRectangle", [Thickness], [X], [Y], [Width], [Height], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawRectangle", [Thickness], [X], [Y], [Width], [Height], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawRectangle", [Thickness], [X], [Y], [Width], [Height], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawRectangleFill", [X], [Y], [Width], [Height], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawRectangleFill", [X], [Y], [Width], [Height], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawRectangleFill", [X], [Y], [Width], [Height], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawString", [X], [Y], [Size], [Text], "[Color]")
- ControlCommand("Sketch Pad", "CanvasDrawString", [X], [Y], [Size], [Text], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasDrawString", [X], [Y], [Size], [Text], [Alpha], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasClear")
- ControlCommand("Sketch Pad", "CanvasClear", "[Color]")
- ControlCommand("Sketch Pad", "CanvasClear", [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasSize", [Width], [Height])
- ControlCommand("Sketch Pad", "CanvasSize", [Width], [Height], "[Color]")
- ControlCommand("Sketch Pad", "CanvasSize", [Width], [Height], [Red], [Green], [Blue])
- ControlCommand("Sketch Pad", "CanvasUndo")
Related Questions
question
Blockly Control Command Combobox Menu Display Issue
Hi DJ Ive downloaded beta Version 2020.04.15.00 on 2 computers and both are having a problem with the Blockly Control...
question
Is There A Skill To Plot Your D1(X) And D2(Y) Locations On A...
Is there a skill in Synthiam ARC to plot your D1 (X) and D2 (Y) locations on an X-Y map? Im trying to simulate the...
Upgrade to ARC Pro
Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.
@Athena Is there a way that we can add or modify the script in Sketchpad to make the line that it is drawing wider? This comes into play with the StepperServo skill whereas you tell it a certain destination and the Arduino takes over. What you end up with in sketch pad is a single dot pixel that gets colored in. Is there a way to add an area around the singular pixel to be filled in with color also. This could be user defined as a 1/4 circle. If you defined 5 destinations with x and y locations you would end up with 5 1/4" circles located on the sketch. If it were traveling with typical servos there would be a 1/4" line to each destination.
Yes, you can modify the script in the Sketch Pad to make the line it is drawing wider. You can achieve this by drawing multiple lines or shapes around the main line to create the appearance of a thicker line. For example, you can draw circles or rectangles around each point to simulate a thicker line.
Here's an example of how you can draw a thicker line by drawing circles around each point:
JavaScript Example
Explanation
CanvasDrawCircle
command is used to draw the circles.drawThickLine
function with specific coordinates, thickness, and color.Drawing Multiple Circles at Destinations
If you want to draw multiple circles at specific destinations, you can modify the script to draw circles at each destination point:
Explanation
drawCircleAtPoint
function.By using these scripts, you can create thicker lines and draw circles at specific destinations on the Sketch Pad. Adjust the parameters as needed to achieve the desired visual effect.
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.
@Athena Nicely done, thanks!
You're welcome! I'm glad I could help. If you have any more questions or need further assistance with Synthiam ARC or any other robot programming tasks, feel free to ask. Happy robot building!
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.
@athena and @automation, there's also several control commands that can do that without needing extra code. Scroll up in the manual to see how you can provide parameters to the ControlCommand() for line width and such.
Yes I see it now, thanks. This will keep things clean and organized without the need for extra coding.
Great catch!Using the built-in control commands for line width and other parameters will indeed keep your code cleaner and more organized.Here's a quick example of how you can use the control commands to draw a thicker line directly:
JavaScript Example
Explanation
CanvasDrawLine
ControlCommand() with the specified parameters to draw the line.This approach leverages the built-in capabilities of the Sketch Pad skill, making your code more concise and easier to manage.
If you have any more questions or need further assistance, feel free to ask!
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.