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

#1 2012-11-01 11:30:34

bblais
New Scratcher
Registered: 2012-10-08
Posts: 1

New NXT Mindstorms - Scratch Project

Hello everyone,

I figured I'd post this to see if anyone is interested.  I have a new project with Scratch for the Lego Mindstorms NXT robots which seems to work, but I hope to smooth out some rough edges over the next month or so.   I am aware of Enchanting, which didn't suit my needs.  In contrast, my project uses the standard NXT firmware (not Lejos), and the standard Scratch 1.4 install (not BYOB).  It's an offshoot of my pynxc project which translates (limited) Python code to NXC (Not Exactly C) which writes to the robot.  My new project, scratchnxc, included in the pynxc files (http://web.bryant.edu/~bblais/projects_html/projects.html) reads Scratch .sb files, and translates to pynxc code and uploads to the robot.  The actual program watches a selected .sb file for changes, and automatically uploads whenever the scratch project is saved.  Check out the docs for the dependencies, examples, etc...

Essentially, I use variables to translate to the robot commands

set [power A] to (100)
set [count] to (0)
repeat until <(sensor 1) < [50]>
change [count] by (1)
end
i've translated all of the control structures, many of the operators, and a small subset of display and sound.  There is at least one worked example included.

If you find it useful, or have any issues, please feel free to email me at [removed by moderator - please don't share contact information].

I hope to put it through its paces in the next month, with middle school students.

Last edited by Paddle2See (2012-11-02 11:20:20)

Offline

 

#2 2012-11-01 11:42:16

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

Oooh, cool!  smile  Are you parsing .sb files yourself?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#3 2012-11-01 23:49:22

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

Wow, this is quite cool! Unfortunately (or fortunately!), I have LeJos, otherwise I would try this.  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#4 2012-11-02 08:09:13

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

Ah, I see you're using Kurt! This is really cool  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#5 2012-11-02 11:05:24

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

Cool idea! You could make some pretty awesome projects with this.


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#6 2012-11-02 18:40:37

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

This seams really cool. My school just got Lego Mindstorms with Tetrix. Do you think there is a way to run the Tetrix motors?


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#7 2012-11-14 21:37:30

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

*BUMP* Again, do you you think you could get it to work with Tetrix motors?


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#8 2012-11-14 22:05:01

Proanimation
Scratcher
Registered: 2011-08-09
Posts: 47

Re: New NXT Mindstorms - Scratch Project

*bump*
Are you using the regular software that comes with the original NXT or something else?
Either way very good idea.

Offline

 

#9 2012-11-15 02:40:12

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: New NXT Mindstorms - Scratch Project

Proanimation wrote:

Are you using the regular software that comes with the original NXT or something else?

I tested it with the original firmware on the NXT, and it seemed to work, if that's what you mean...


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#10 2012-11-15 21:25:01

Proanimation
Scratcher
Registered: 2011-08-09
Posts: 47

Re: New NXT Mindstorms - Scratch Project

blob8108 wrote:

Proanimation wrote:

Are you using the regular software that comes with the original NXT or something else?

I tested it with the original firmware on the NXT, and it seemed to work, if that's what you mean...

Oh good I really would want that software when you finish with it. It would be very useful.

Offline

 

#11 2012-11-20 09:49:22

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

Re: New NXT Mindstorms - Scratch Project

I'd like to test your project with stander firmware NXT and NXC.

I'll check and test your project.

Thanks!

Last edited by touch_classroom (2012-11-20 09:50:51)

Offline

 

Board footer