Is S2P working with Scratch online?

jguille2

New Member
Hi,

I work in Linux, but I've been testing in Windows XP and W7.

I can work with S2P and Scratch Offline, but Online version doesn't work. In online scratch, extension shows the green indicator... but I can't send any order and I can't get a response.

It's strange for me. I know scratch extensions and their http requests. I've seen Online and Offline have the same request (for example http://localhost:50212/outputOn/B.1)... and I launch this from browsers too. Board only works with Offline Scratch request.

Can you test if really online Scratch is working with S2P? Can you tell me more about S2P behavior? Maybe it filters http headers?

A little more about my goals...

I'm working with Snap4Arduino. Snap! is my option to teach CS and Robotics. Arduino is fine for me... but Picaxe is fine too... and I don't want to restrict my proposals (my job is in teacher training) only to one hardware. With S2P running for Scratch, it's easy to make a Snap extension. I'll make this extension ... but I need to check if S2P responses run like I expect.

Thanks!

Joan
 

Technical

Technical Support
Staff member
MIT broke all online versions of 444.x and 445.x Scratch so they did not work with any extension, PICAXE or anything else. We believe Scratch v446 is now working again, although you will also need to update S2P (to 0.1.2) due to changes made in the Scratch file format.

We suspect your offline version was simply an older version of Scratch, and hence didn't have this issue.
 

Technical

Technical Support
Staff member
It looks like v446 still might still have an issue as well, we'll look into it.
 

jguille2

New Member
Thanks,

I've read about this problem now... but I think I have another problem.

Now I'm testing in Windows7, with S2P 0.12 and Scratch v446 (online and offline editor, the same version). I still have the same problem: offline i running and online not.

Could you briefly explain S2P operation? Leaving aside scratch issues, I don't undestand why S2P is not responding to my http request!

-I'm running S2P (0.12) and it's connected to the board (green light).
-In my browser I make an http request: http://localhost:50212/outputOn/B.1
-S2P answer my request and I see a web page with info about my request (http headers...)
-But nothing works in the board.

I you give me a hint... I continous working...

Thanks in advance,

Joan
 

Technical

Technical Support
Staff member
At present there is a header check we used during development - if the header comes from a flash based environment (either online or offline) it will process as a command, if not (e.g. from a browser) it just displays a debugging web page instead. This is why your browser URL attempt doesn't work. However this check was really just for testing during our development, so we've just turned the check off in version 0.13 which is now available online to download. So you can now also send commands from a non-flash environment such as Snap/javascript or even just a browser URL.

This version also fixes the issue with v446 - hopefully MIT will leave it alone again for a while now!
 

jguille2

New Member
Thanks

I've tested 0.13 and it runs ok!

Then, I'll make an xml file with the Snap! blocks to work with S2P. I'll share my files in this forum.

In Snap! build this blocks it's easy... First I'll make the 'basic blocks' (like 'Turn pin x to y state'). Then, make custom blocks in Snap is just a game... and we can share 'extensions' to work with boards. In our case, we are working with Imagina board (from robolot -picaxe.es) and we can share snap projects working like 'wedos' (light, temperature...sensors, turn lights on, move motors...)

Joan
 
Top