Discuss Scratch

bharvey
Teacher
1000+ posts

Scratch To Lego Mindstorm

Compiling Snap! to something that runs on a robot is coming – Berkeley engineering undergrads run a robotics competition for local area high schools that has always required C++ programming, which has always been a bottleneck, and they want to move to Snap! as the development environment. Not next week, but within a year, I'd say. Once we can do it for one robot, I expect it'll quickly spread to supporting others. (You know, right, that we do already support real-time control of non-autonomous robots from Snap! itself?)

The point of Snap! (someone asked above) is mainly, at this point, first class (anonymous) procedures. The first and biggest extra feature in BYOB, the previous version, was the ability to build custom blocks. We're very pleased indeed that Scratch 2.0 allows custom command blocks, and the ST has promised custom reporters in a later version. We take full credit for talking them into that! But the ST isn't interested, so far anyway, in adding anonymous procedures (lambda), and we need that to teach our new introductory computer science curriculum for high school and non-CS-major college students.

We know there are missing features. The ST delayed the public release of Scratch 2.0 until it was 100% ready. We're doing an extended beta cycle, doing our development in public so we can get the benefit of a lot of users banging on it. At the moment we're worrying about several reports from teachers about non-reproducible failures to save and load projects, which is a showstopper bug that pushes everything else into the waiting list. Bear with us.
SimpleScratch
Scratcher
500+ posts

Scratch To Lego Mindstorm

It's definitely possible to run offline, but not easily as of yet.
Em - its very easy to run off line - just download from here stick it in a folder and open up snap.html in your browser and off you go.

Even “works” on a RaspberryPi - works in the sense of 20 secs between click responses -so not actually viable at the moment

Simon
Hardmath123
Scratcher
1000+ posts

Scratch To Lego Mindstorm

Well, depending on your browser you may need to serve it up on local host to avoid some cors tainting issues.

Maybe Snap! Would include a simple server with it (simple==double-click-launch).

Serious off-topic…
SimpleScratch
Scratcher
500+ posts

Scratch To Lego Mindstorm

some cors tainting issues.

What are those?

Simon
Hardmath123
Scratcher
1000+ posts

Scratch To Lego Mindstorm

Well, CORS is a way for a server to tell a JavaScript program “yeah, you're allowed to use this data”. Otherwise you could do all sorts of malicious gobbledegook on the client side and get away with it (for example, get the contents of gmail.com and send the data to your server).

The reason this bothers Snap! is that images are protected like this, too. If a non-cors image is loaded and drawn by Snap!, JS goes crazy and tries to prevent Snap! from reading the image's data (again, for security). This is called a “tainted canvas”. So lots of errors are thrown and the application appears to die.

If we serve Snap! instead of running it from a file/ (or C:\) path, Chrome gives it slightly more privileges.

Last edited by Hardmath123 (Sept. 30, 2013 03:19:11)

AwesomenessExposed
Scratcher
100+ posts

Scratch To Lego Mindstorm

I don't think that mindstorms would be happy to join with Scratch, because Scratch isn't commercial, so they wouldn't get any money out of it.
MinecraftCreeper245
Scratcher
1 post

Scratch To Lego Mindstorm

I think that if Lego asked the Scratch company, maybe they could find a way to join them both together! Otherwise, I agree with @AwesomenessExposed that they wouldn't go GOOD together, if that's what he means…
Spunky_Sam
Scratcher
44 posts

Scratch To Lego Mindstorm

YES!!!
That would be bad awesome!

PLEASE!
randomsomeone321
Scratcher
21 posts

Scratch To Lego Mindstorm

test

Last edited by randomsomeone321 (Nov. 16, 2013 15:33:44)

LightningGuy
Scratcher
100+ posts

Scratch To Lego Mindstorm

I know something that is compatible with Scratch and Lego Mindstorms, and here it is: (I did a quick Google search and found it on the Scratch Wiki) Enchanting. More info at: http://wiki.scratch.mit.edu/wiki/Enchanting_(Scratch_Modification)
DrSausage
Scratcher
26 posts

Scratch To Lego Mindstorm

On 14/12/2013, I'm doing a First Lego League Tournament, the theme is Nature's Fury

whenclickedifDay/Month/Yearequals14/12/2013thensayIt's time!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hfj333
Scratcher
6 posts

Scratch To Lego Mindstorm

SimpleScratch wrote:

It's definitely possible to run offline, but not easily as of yet.
Em - its very easy to run off line - just download from here stick it in a folder and open up snap.html in your browser and off you go.

Even “works” on a RaspberryPi - works in the sense of 20 secs between click responses -so not actually viable at the moment

Simon

But it is not work!
technoboy10
Scratcher
1000+ posts

Scratch To Lego Mindstorm

hfj333 wrote:

SimpleScratch wrote:

It's definitely possible to run offline, but not easily as of yet.
Em - its very easy to run off line - just download from here stick it in a folder and open up snap.html in your browser and off you go.

Even “works” on a RaspberryPi - works in the sense of 20 secs between click responses -so not actually viable at the moment

Simon

But it is not work!
What doesn't work?
gatzke
Scratcher
100+ posts

Scratch To Lego Mindstorm

DrSausage wrote:

On 14/12/2013, I'm doing a First Lego League Tournament, the theme is Nature's Fury

AFAIK, FLL only allows a couple of different ways to code for the competition. The methods they allow are limited at best, using terrible GUI programming systems.

I will say I got Enchanting to work recently on a NXT, so it seems reasonable. The downside is you must use their old Scratch version which looks quite dated. And students would probably have to bounce between 2.0 for online stuff and Enchanting with the old interface + some oddness with the NXT configuration.

Here is my updated NXT testbed so students could try some logic before they go to hardware…
http://scratch.mit.edu/projects/17044045

hoole001
Scratcher
1000+ posts

Scratch To Lego Mindstorm

That would be pretty cool. We are doing Lego Mindstorm robots at our school for 6th grade (but our class isn't doing it yet). But they would probably have to make some special blocks for the robots.
chubbymomo
Scratcher
2 posts

Scratch To Lego Mindstorm

whenclickedmove10steps
they-might-be-cats
Scratcher
100+ posts

Scratch To Lego Mindstorm

I think scratch would have to change to make this work
HyperSteve
New Scratcher
2 posts

Scratch To Lego Mindstorm

Is Scratch compatible with Arduino?
My browser / operating system: Windows XP, Firefox 27.0, Flash 12.0 (release 0)














–> Please???
sdmeijer
Scratcher
100+ posts

Scratch To Lego Mindstorm

HyperSteve wrote:

Is Scratch compatible with Arduino?
My browser / operating system: Windows XP, Firefox 27.0, Flash 12.0 (release 0)

–> Please???
Yes it is. See https://github.com/MrYsLab/s2a_fm
ghjkf
Scratcher
4 posts

Scratch To Lego Mindstorm

how much are these (moveable parts)
sayhow much are these (moveable parts)

Powered by DjangoBB