Scratch - selecting one Marty from many

I had a few problems with the Scratch extension on Firefox (with NoScript). They don't load automatically from the link and it didn't seem able to find my Marty. I gave up on that and am now using Chrome which seems to work well and will launch from the link you have on your page. I just ran the current graphing one for right arm movement. I'm curious what the units are?

One thing I haven't worked out yet is how the Marty Selector blocks work? I thought I'd just add the "Select Marty on IP" and tap in the ip address of my Marty but it seems to block on that and do nothing. At the moment I only have one Marty so I can use the autoscan. Some of my friends have multiple ones, I'm assuming they will need to be able to explicitly select them?

Is it also possible to autoscan and filter out the appropriate Marty by name? That might work well for some users and make code more robust for ip changes.


Leave a comment and join the discussion here

Please Log In or Sign Up to write a comment response

5 Responses

kjw OP

I've just been using Scratch and noticed the selection via Select Marty block (by name) works well in Chrome at the moment. I'll try setting up the wireless access point on that host and will report back if it still works. I forget the circumstances on the testing below but in I speculate that the use of 192.168.137.x for Marty (on a laptop) with two (logical) network interfaces might have made things a bit more complex.

BTW, does the new allow you to use Marty without an Internet connection? You may want to make that more explicit in the description if that's the case.

14:09:13, 15th May 2018   |   Permalink   |   View Source
sandy STAFF


Just made a wee update to the scratch extensions to try and fix the get ready/unpause issue, and also make the add by IP work a lot more quickly

As always feedback and further comments are really welcome!


17:10:29, 01st September 2017   |   Permalink   |   View Source
sandy STAFF

Hi kjw,

Thanks for the comments - quite a few things to think about!

We'll have a look into Firefox with NoScript - I suspect NoScript will be causing some issues here. Theres a bit of javascript trickery where we load the Marty scan scripts from somewhere else to avoid duplicating them, and I suspect NoScript is blocking that from happening properly.

The Marty selector blocks in the Scratch interface are currently set to only appear if the auto scanner doesn't find any Martys, or finds more than one. If it finds more than one, then a list of Martys by name will appear in the upper block. I've used that in scripts to control multiple Martys before. It seems like a bug that's making the select by IP hang - I'll have a look at that

You're right - at the moment you need to use an enable motors to un-pause after a stop and wait, but the Get Ready block should probably also un-pause movement. I'll add it to the issue list ;-)

Thanks again for all the feedback - really grateful to have this stuff pointed out!


p.s. re the motor current units, just did a quick back of the envelope sum and they should roughly be the motor current scaled by about 0.03. We probably should apply that scaling factor in the API and present the value in amps, but I'd want to do a bit of calibration and testing before stating that!

15:11:44, 28th August 2017   |   Permalink   |   View Source
kjw OP

Another issue, if Stop and pause has been executed, Marty then stops moving even if you start a new script with Get Ready in it. This can be confusing if you are developing a script and changing things around.

Was Get Ready intended to do a full reset/initialisation? It appears I need to always execute Enable Motors after Stop and pause?

18:45:09, 26th August 2017  *   |   Permalink   |   View Source
kjw OP

Reading the docs perhaps this feature only enables when there is more than one Marty auto-scanned?

I've noticed if I fire up a fresh Chrome then go to scratch via your link then the top circle stays yellow. I left it a few minutes and no change. The top circle only goes green when I go to the Select Marty on IP and type in my ip and double click that block. I still cannot use that block in a script as it blocks execution but once the autoscan is green I don't need it. So it does work for me but it's a bit clumsy.

This is Chrome 60.0.3112.113 and Flash 26.0.0

18:24:28, 26th August 2017   |   Permalink   |   View Source