Discuss Scratch
- Discussion Forums
- » Connecting to the Physical World
- » Scratch To Lego Mindstorm
- bharvey
-
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.
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!

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
-
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
-
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…
Maybe Snap! Would include a simple server with it (simple==double-click-launch).
Serious off-topic…
- SimpleScratch
-
500+ posts
Scratch To Lego Mindstorm
some cors tainting issues.
What are those?
Simon
- Hardmath123
-
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. 
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


Last edited by Hardmath123 (Sept. 30, 2013 03:19:11)
- AwesomenessExposed
-
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
-
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…
- randomsomeone321
-
21 posts
Scratch To Lego Mindstorm
Last edited by randomsomeone321 (Nov. 16, 2013 15:33:44)
- LightningGuy
-
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
-
26 posts
Scratch To Lego Mindstorm
On 14/12/2013, I'm doing a First Lego League Tournament, the theme is Nature's Fury
- hfj333
-
6 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
But it is not work!
- technoboy10
-
1000+ posts
Scratch To Lego Mindstorm
What doesn't work?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!
- gatzke
-
100+ posts
Scratch To Lego Mindstorm
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
-
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.
- they-might-be-cats
-
100+ posts
Scratch To Lego Mindstorm
I think scratch would have to change to make this work
- HyperSteve
-
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???
My browser / operating system: Windows XP, Firefox 27.0, Flash 12.0 (release 0)



- sdmeijer
-
100+ posts
Scratch To Lego Mindstorm
Yes it is. See Is Scratch compatible with Arduino?https://github.com/MrYsLab/s2a_fm
My browser / operating system: Windows XP, Firefox 27.0, Flash 12.0 (release 0)–>
Please???
- Discussion Forums
- » Connecting to the Physical World
-
» Scratch To Lego Mindstorm