CodeLabClub / codelab_adapter_extensions

codelab_adapter extensions
GNU General Public License v3.0
143 stars 72 forks source link

Scratch3 Alphamini extension and enabling other features #57

Open geraicerdas opened 1 year ago

geraicerdas commented 1 year ago

Hi,

You have done a really awesome job. FYI I've been playing Alpha Mini with python mini-sdk and tried the official Scratch programming for alphamini called uCode. But I really excited with your huge works.

I'm planning to add some other Alpha mini features.

So I'm looking for scratch extension for alphamini. Would you help me with that?

Thank you

wwj718 commented 1 year ago

Hi geraicerdas,

image

You can achieve these goals with these two blocks, which allow you to get any of the capabilities of Python sdk.

If you would like to do more, you'll even be able to introduce most of Python's capabilities into the Scratch page without rebuilding Scratch. This means that the end user can do it too.

https://adapter.codelab.club/extension_guide/extension_python_kernel/#_5

geraicerdas commented 1 year ago

Hi,

Thank you for your reply. I got your viewpoint. You methods also minimize the development efforts.

Yes, getActionList block is quite helpful. Currently we just print out the the action list from the alphamini developer so my kids can easily read the list and choose the action. But it seems the getActionList just returning the list of behavior, action and expression only, not all of the capability of alphamini sdk. CMIIW

alphamini_broadcast_return

So my next question is, could you assist me how to achieve the rest of the goals with the existing extensions and nodes?

For instance in the alphamini sdk demo provided by marklogg, there is a test_sound.py which is can make alphamini playing a cloud mp3 file. Is there any ways to make the alphamini can do this ability?

play_audio_online

wwj718 commented 1 year ago

hi geraicerdas,

We have no plans for more extensions to continue enhancing the Scratch3 Alphamini extension for now, we are trying to provide some generic blocks for users to introduce more capabilities from Python to Scratch , but the usability may not be good enough. The way to improve the usability is to write more code at the UI level, but that need a lot of work and our small team doesn't have more energy to do that at the moment, so sorry. The official UBTECH team might have more motivation to do that, you could contact them, good luck!

geraicerdas commented 1 year ago

Hello,

It is possible to get .js alphamini extension, so I can help you to improve this extension? Thanks

wwj718 commented 1 year ago

Sure, I'll clean the code and put it on Github

wwj718 commented 1 year ago

https://github.com/CodeLabClub/scratch3_alphamini @geraicerdas

geraicerdas commented 1 year ago

Hi,

Thank so much for making the code available for public. I will try to modifying this extension, and will let you know the result.

geraicerdas commented 1 year ago

Hi @wwj718

Here is my few mod update. I've succesfully added a dropdown list for block behavior, action, and sound. added play a sound block. Both local and online added play wikipedia block added translate block

I've tested with my alpha mini robot, and it works great. Some features are still work in progress.

new_alphamini_extension3

new_alphamini_extension4

Please have a look my mod in case you/anyone want to update or want to makes another version. Scratch3_alphamini updated by geraicerdas

Thanks again for your amazing works, especially for making the sources available for public

wwj718 commented 1 year ago

Great work ! Thank you for sharing ! We will benefit from your work, and I expect we will soon merge these updates into our online platform.