This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-11-01 23:34:54

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

NXT Programming with Enchanting

Jump here for the announcement of Enchanting 0.2.3 (or read about it on The NXT Step blog).

Jump here for the announcement of Enchanting 0.0.7.

Jump here for the announcement of Enchanting 0.0.4.

---------------

I'd like to introduce a new mod -- Enchanting.

Enchanting, as the video at the website shows, is an editor based on Scratch for programming LEGO Mindstorms NXT robots.  It is a very early release right now, really, more of a developer's preview than a useful application, although it does work.

You may be interested in it even if you do not have an NXT.  It is possibly to partially run it without installing the LeJOS environment by going into the FrontEnd directory and running EnchantingFE.

Two features that may be of general interest are:

1) Your Scratch-like script can be exported to computer source code.  Right now it exports to Java, but you can create your own template and translation files to emit code in the language of your choice.  [Write up some code, and choose File -> Export Code.  It will save it as a java file, runnable on an NXT with LeJOS installed.]

2) You can export and import your Squeak code to files on the disk, and then put them under a standard version control system.  [See this page, which is just a bit dated.]  (If you want just the code to do this, give me a head's up and I'll help you out.)

Beyond that, of course, the main feature is that you can program for the NXT!

If any of you talented people would like to help test or code, I'd be thrilled!  If anyone would like to use parts of the code, go right ahead.

Last edited by clintonb (2013-02-04 22:24:45)

Offline

 

#2 2010-11-02 10:58:26

touch_classroom
Scratcher
Registered: 2009-09-28
Posts: 25

Re: NXT Programming with Enchanting

I don't know the technic part of Enchanting, buy I'd like to help testing.  smile

Offline

 

#3 2010-11-02 13:18:58

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

I'd be happy to have you help out by testing, touch_classroom!  I take it you have an NXT.  Why don't you see if you have any difficulties installing and running the software, and then, consider joining the e-mail list or e-mailing me.

Offline

 

#4 2010-11-02 15:24:52

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

With that said, if anyone tries it out and would prefer to leave a comment here than contact me or join the Enchanting mailing list, by all means do so.  I plan to check on this thread from time to time.

Offline

 

#5 2010-11-02 18:45:33

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: NXT Programming with Enchanting

Wow! This looks VERY impressive!

I have LEGO WeDo, but of course I always thought it was a bit silly we couldn't use Scratch to program it. But I can tell, you put a lot of work to make this possible! Based on the video on the website, it seems to have a lot of well-working features! Sure, some may have been removed, but it's all to make sure it's compatible I think  wink .

What would be nice to me, is if there was a way so you could put elements on the Scratch stage as well as interact with the NXT. This way you wouldn't have to remove anything - and you could use the NXT to change things in-game.

Also, I think it might not be helpful for *everybody* that when you press the green flag, it downloads and compiles, but then immediately plays the program. Perhaps you want to wait so you can detach the cables or something.

These are just suggestions though. Tell me what you think  smile


http://i.imgur.com/WBkM2QQ.png

Offline

 

#6 2010-11-02 19:40:11

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: NXT Programming with Enchanting

This looks really, really, cool. I wish I had an NXT kit to try it out. Can't wait to see more of Enchanting!


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#7 2010-11-03 10:46:14

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

Thank you, fullmoon.

Lucario621,

I agree that a method to upload the code without running it would be useful.  I'm contemplating making it so you shift-click or right-click on the green flag to do that. 

You are aware that you can use LEGO WeDo with Scratch, are you not?  From the bottom of the edit menu, choose "Show Motor Blocks" and you'll have a couple of new motion blocks and some new options for the sensor blocks.  Take a look at http://info.scratch.mit.edu/WeDo .

I also intend to make it so that you can have a program in Scratch that interacts with your program on the NXT.  Specifically, the NXT will act as a remote sensor for Scratch, and Scratch will act as a remote sensor for the NXT; this means that it will be possible to read global variables that the other system is using and send broadcasts between the devices.  Beyond that, I want to make it so that you can draw black-and-white sprites that appear on the NXT screen and can move around, just as they do in Scratch.  (See http://enchanting.robotclub.ab.ca/Feature+Blueprints )

Thanks for the great suggestions!

Offline

 

#8 2010-11-03 21:15:42

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: NXT Programming with Enchanting

clintonb wrote:

Thank you, fullmoon.

Lucario621,

I agree that a method to upload the code without running it would be useful.  I'm contemplating making it so you shift-click or right-click on the green flag to do that. 

You are aware that you can use LEGO WeDo with Scratch, are you not?  From the bottom of the edit menu, choose "Show Motor Blocks" and you'll have a couple of new motion blocks and some new options for the sensor blocks.  Take a look at http://info.scratch.mit.edu/WeDo .

I also intend to make it so that you can have a program in Scratch that interacts with your program on the NXT.  Specifically, the NXT will act as a remote sensor for Scratch, and Scratch will act as a remote sensor for the NXT; this means that it will be possible to read global variables that the other system is using and send broadcasts between the devices.  Beyond that, I want to make it so that you can draw black-and-white sprites that appear on the NXT screen and can move around, just as they do in Scratch.  (See http://enchanting.robotclub.ab.ca/Feature+Blueprints )

Thanks for the great suggestions!

Ah, yes I did know how to program LEGO WeDo with Scratch. I worded that extremely badly... I meant to say that I thought it was that you couldn't program LEGO Mindstorms with Scratch.

Anyways, having sprites on the NXT would also be really awesome! Quite a bit of work, I'm wondering how you would add that but... would be a great feature!

Keep up the good work!  smile


http://i.imgur.com/WBkM2QQ.png

Offline

 

#9 2010-11-06 17:02:42

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: NXT Programming with Enchanting

It would be cool if it had all of the normal Scratch things as well as the NXT things.

Offline

 

#10 2010-11-08 09:17:14

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

Billybob-Mario wrote:

It would be cool if it had all of the normal Scratch things as well as the NXT things.

My intentions in that regard are two-fold:

1) Make it so that Enchanting connects to Scratch via remote sensor connections.  (Indeed, if you run Enchanting right now, run Scratch, turn on remote-sensor connections in Scratch, you can send a broadcast from the Enchanting window (not from the robot yet) and it will be picked up and acted upon by Scratch).

2) Make Enchanting into a sort of Scratch For the NXT.  I hope to be able to make sprites move around the NXT screen, and to play sounds, and such, and incorporate as many standard Scratch blocks as possible.

: )

Offline

 

#11 2010-11-08 15:22:45

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: NXT Programming with Enchanting

clintonb wrote:

Billybob-Mario wrote:

It would be cool if it had all of the normal Scratch things as well as the NXT things.

My intentions in that regard are two-fold:

1) Make it so that Enchanting connects to Scratch via remote sensor connections.  (Indeed, if you run Enchanting right now, run Scratch, turn on remote-sensor connections in Scratch, you can send a broadcast from the Enchanting window (not from the robot yet) and it will be picked up and acted upon by Scratch).

2) Make Enchanting into a sort of Scratch For the NXT.  I hope to be able to make sprites move around the NXT screen, and to play sounds, and such, and incorporate as many standard Scratch blocks as possible.

: )

Why did you get rid of the normal blocks, though?

Maybe the best solution would be to have an NXT object under the stage, and have everything else have normal blocks.

Offline

 

#12 2010-11-08 15:26:38

turntechGodhead
Scratcher
Registered: 2010-10-11
Posts: 100+

Re: NXT Programming with Enchanting

cool

i wish i had one of those robot things
i would make an rc car


----------------http://i52.tinypic.com/2qbztw5.png
---------------------------------------------------BUYB THE SHORT

Offline

 

#13 2010-11-11 23:07:13

Dymo
New Scratcher
Registered: 2010-10-22
Posts: 3

Re: NXT Programming with Enchanting

How did you do this? It must've been hard work digging through all that code.


http://internetometer.com/image/22370.png
I'm not afraid of dying, I'm afraid of the pain that comes with it.

Offline

 

#14 2010-11-12 05:36:27

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: NXT Programming with Enchanting

Wow! I'm impressed! After watching your video through, I think this is a great project! I have signed up, and I'd love to help test this! I do have a NXT, and I'll admit they are great, but they do lack a good feature like this  wink

I can see throught your video that you have spent a while working on this, and it looks great! I'm glad I stumbled across it.

A word of advice to you:
Posting this here, you won't get that much attention from the community, as there are few people here who actually have Mindstorms. Could I suggest posting it here, at a forum called eurobricks. The link will take you straight to their Technic and Midstorms section, where there are plenty of people with Mindstorms and I'm sure would be willing to help there. By the way, it is a lego forum, not Scratch, so you will have to explain what Scratch is to them  smile  . I do not have an account there, becuase of the fact that you have to be over 18 to register, and I don't want to be told off for making a dodgy account :\ .

I wish you good luck  smile


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#15 2010-11-14 00:51:10

Mcsugarface
Scratcher
Registered: 2009-11-16
Posts: 100+

Re: NXT Programming with Enchanting

A Scratch program that works with NXT is cool!  big_smile


Hi! I'm http://blocks.scratchr.org/API.php?user=USERNAMEHERE&action=onlineStatus&type=text!
http://internetometer.com/imagesmall/11070.png

Offline

 

#16 2010-11-14 01:37:26

gog1
Scratcher
Registered: 2010-10-22
Posts: 17

Re: NXT Programming with Enchanting

i have a nxt 2.0!!!!!!


Hi!

Offline

 

#17 2010-11-14 11:29:38

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: NXT Programming with Enchanting

Can you look at what I said?

Offline

 

#18 2010-11-14 17:17:25

krackers
Scratcher
Registered: 2010-05-08
Posts: 61

Re: NXT Programming with Enchanting

I'm a bit late to this thread, but I would like to say hi. I'm part of the enchanting team.

Billybob, he deleted the normal blocks because he has not found a way to distinguish between normal and nxt blocks. The way enchanting currently works is that it converts the blocks you place directly to lejos code. It uses the same translation mechanism built into scrath.

Offline

 

#19 2010-11-14 17:18:59

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: NXT Programming with Enchanting

This is so awesome!


Jens Mönig

Offline

 

#20 2010-11-15 07:29:53

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: NXT Programming with Enchanting

krackers wrote:

I'm a bit late to this thread, but I would like to say hi. I'm part of the enchanting team.

Billybob, he deleted the normal blocks because he has not found a way to distinguish between normal and nxt blocks. The way enchanting currently works is that it converts the blocks you place directly to lejos code. It uses the same translation mechanism built into scrath.

Maybe you could have an extra box under the stage for the NXT, and all of the other sprites would just be sprites.

EnchantingNXTMorph or something.

Offline

 

#21 2010-12-09 23:14:24

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

Good heavens.  Sorry for the late replies, everyone. 


Dymo,

Yes, it has been a lot of working digging into the code.  The team at MIT have done a really excellent job, and, the more I figure things out, the more enjoyable it is to work with the code.


Sperry,

Good tip -- I'll be sure to post to Eurobricks.  I hope to have Enchanting version 0.0.4 out by the 15th, and then it might be a good time to let them know.  I have let the mindboards and lejos communities know as well.


Jens,

Boy am I glad to hear that!


Billybob-Mario,

I removed blocks from Enchanting that don't make sense for use on the NXT at this time.  In the future, I hope to add sprites for use on the NXT, using the whole screen as a stage, and then almost all of the regular blocks will be applicable, but, again, only run on the NXT.  In order for someone to use regular Scratch blocks to interact with the robot, they'll need to use the regular Scratch application and connect it to Enchanting (after the feature is implemented).

Your thought is not a bad thought -- build up on the awesomeness that is Scratch, and add NXT specific features to it.  Especially as I want to have multiple sprites on the NXT, I think it'd be confusing telling which ones belong there, and which ones belong on the Scratch stage.  Partitioning the library under the stage may help.  Frankly, it makes sense to me to simply use Scratch for programming on the computer, Enchanting for programming on the NXT, and allowing the two programs to communicate so that your Scratch program can control your robot, and vice versa.

Offline

 

#22 2010-12-11 19:05:14

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: NXT Programming with Enchanting

clintonb wrote:

Good heavens.  Sorry for the late replies, everyone. 


Dymo,

Yes, it has been a lot of working digging into the code.  The team at MIT have done a really excellent job, and, the more I figure things out, the more enjoyable it is to work with the code.


Sperry,

Good tip -- I'll be sure to post to Eurobricks.  I hope to have Enchanting version 0.0.4 out by the 15th, and then it might be a good time to let them know.  I have let the mindboards and lejos communities know as well.


Jens,

Boy am I glad to hear that!


Billybob-Mario,

I removed blocks from Enchanting that don't make sense for use on the NXT at this time.  In the future, I hope to add sprites for use on the NXT, using the whole screen as a stage, and then almost all of the regular blocks will be applicable, but, again, only run on the NXT.  In order for someone to use regular Scratch blocks to interact with the robot, they'll need to use the regular Scratch application and connect it to Enchanting (after the feature is implemented).

Your thought is not a bad thought -- build up on the awesomeness that is Scratch, and add NXT specific features to it.  Especially as I want to have multiple sprites on the NXT, I think it'd be confusing telling which ones belong there, and which ones belong on the Scratch stage.  Partitioning the library under the stage may help.  Frankly, it makes sense to me to simply use Scratch for programming on the computer, Enchanting for programming on the NXT, and allowing the two programs to communicate so that your Scratch program can control your robot, and vice versa.

Thanks. Good luck with your mod!

Offline

 

#23 2010-12-11 21:51:24

clintonb
Scratcher
Registered: 2010-05-27
Posts: 30

Re: NXT Programming with Enchanting

Billybob-Mario wrote:

...
Thanks. Good luck with your mod!

Thank you, Billybob-Mario.

Clinton

Offline

 

#24 2010-12-12 04:22:15

nxsupert
Scratcher
Registered: 2009-07-26
Posts: 100+

Re: NXT Programming with Enchanting

This is a good idea but I do not think that the 'LEGO company' will like it. I know some people (advanced programmers that are LEGO and Scratch users) who are working on it.
lol  lol  lol  lol  lol  lol  lol  lol  lol  lol


I am Back!

Offline

 

#25 2010-12-12 06:21:45

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: NXT Programming with Enchanting

clintonb wrote:

Sperry,

Good tip -- I'll be sure to post to Eurobricks.  I hope to have Enchanting version 0.0.4 out by the 15th, and then it might be a good time to let them know.  I have let the mindboards and lejos communities know as well.

Great, I think they should appreciate it, there are lots of people there who like their lego!  tongue

Good luck with the project!


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

Board footer