Asked — Edited
Resolved Resolved by DJ Sures!

Create Custom Blockly Blocks

DJ, could you please add a feature in your next revision to create custom Blocks in Blockly. I have been researching it and it is possible. This would allow me to create my own library. Thanks.


ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

#1  

DJ, could you please add a feature in your next revision to create custom Blocks in Blockly. I have been researching it and it is possible. This would allow me to create my own library. Thanks.

PRO
Synthiam
#2   — Edited

Thank you for the feedback. However, You can do that right now. The Blockly code is in this folder on a default installation of ARC: C:\Program Files (x86)\Synthiam Inc\ARC by Synthiam\Blockly

However, it makes more sense for your Blockly code to have Functions rather than creating custom blocks. But if that's what you're thinking of tackling, you can do so in the code folder above.

User-inserted image

C:\Program Files (x86)\Synthiam Inc\ARC by Synthiam\Blockly\Blocks - is the standard folder for the block definitions

C:\Program Files (x86)\Synthiam Inc\ARC by Synthiam\Blockly\generators - is the standard folder for the code generator. The ARC code generator is JavaScript.

C:\Program Files (x86)\Synthiam Inc\ARC by Synthiam\Blocklyindex.html - is the file that lists the blocks on the menu. You'll add your block and respective code generators into that file.

So you'll create custom blocks and custom generator files. If you edit the existing block and generator files, they will be overwritten when ARC updates. You'll have to create your own files so they will not be overwritten.

You'll need to read the Blockly webpage manuals and documentation on their website for how to create blocks with their UI

PRO
Synthiam
#3   — Edited

Also, I moved your comment into a new thread because you replied to a thread that was unrelated to the topic. Please organize your questions in the correct threads or create a new one:) Thanks

PRO
Synthiam
#4  

BTW, this is what i mean by a Function. You can take some Blockly courses online or watch The Robot Program on ez-robot's website to learn more

User-inserted image

#5  

Wonderful, Blockly is so close already want to make a block that Servo(1.D2,180) whereas you put in a selected Board same thing with Digital.set(2.D3,125) etc On a different question is it possible in your next revision to revise the degree into having a decimal point 90.6 This would give it a tenfold degree of accuracy. Thanks again for pointing me in the right direction, time to dive in.

PRO
Synthiam
#6   — Edited

That already exists. You can specify the board for servos and ports etc...

Ensure you are running the latest version. Since you are a Pro user, it's recommended to run the Early Access edition to get the latest features.

User-inserted image

This next answer is off-topic and should have its own thread. I'll answer it here, but please create threads for topics. Answer: The servo resolution is limited to the type of servo, not the software. If you had a servo with a higher resolution (i.e. Dynamixel from Robotis), then you can have up to 4096 resolution. You must be using a PWM style servo, which has a limited resolution of 180 degrees.

#7   — Edited

Ahh sweet, I did not have the latest version.

Moved over thread on degrees resolution

Thanks again,

#8  

BTW well beyond 180 degree or 360 degree servos. Went to technical high school for machine tool, then college for electrical engineering, make a living building circular and elipticle stairs which I can do the calculations simply in my head and with paper and pencil. But my passion ia in automation and robotics, that is why I love your robot system because it integrates everything and is so advanced, just trying to get to your next level.

PRO
Synthiam
#9  

That’s great! Thank you so much for the kind words.:) sounds like making robots is right up your alley