I want my students to use Enchanting a derivative of Scratch to program Mindstorm NXT robots to drive a pre-programmed course, follow a line and avoid obstacles. (Two state, five state and proportional line following.) Is Enchanting developed enough for middle school students to program these behaviors?
4 Answers
I'm the lead developer on Enchanting, and the answer is: Yes, definitely.
The video demoing Enchanting 0.0.4 shows how to make a proportional line follower (and you could extend it to use a PID controller, if you wish). If you download the latest version, 0.2.2, it includes a sample showing a two-state line follower (and you can see a video and download code here). You, or with some instruction / playing around, a middle-schooler, can readily create a program to do n-states, and, especially if you follow a behaviour-oriented approach, you can avoid obstacles at the same time.

- 2,427
- 2
- 24
- 31
-
Does Enchanting download something to NXT? If not, what was the goal of the project? I'm not familiar with NXT, but assume Lego provides some usable Software for programming NXT? – Valentin H Aug 17 '14 at 23:32
-
@ValentinHeinitz, certainly Enchanting uploads binary code to the NXT. Take a look at the site and the videos. LEGO does provide software, but Enchanting offers an alternative. – Clinton Blackmore Aug 19 '14 at 14:40
As far as I know, yes and no.
What Scratch does with its sensor board, Lego Wedo, and the S4A - Scratch for Arduino - version as well as, I believe, with NXT is basically use its remote sensor protocol - it exchanges messages on TCP port 42001.
A client written to interface that port with an external system allows communication of messages and sensor data. Scratch can pick up sensor state and pass info to actuators, every 75ms according to the S4A discussion.
But that isn't the same as programming the controller - we control the system remotely, which is already very nice, but we're not downloading a program in the controller (the NXT brick) that your robot can use to act independently when it is disconnected.

- 3,679
- 2
- 27
- 53
-
1Programs written in Enchanting and uploaded to the NXT do, in fact, run autonomously and independently. (It can also communicate variable changes and broadcasts live to your computer). – Clinton Blackmore Aug 19 '14 at 16:12
-
Have you looked into 12blocks? http://12blocks.com/ I have been using it for Propeller and it's great and it has the NXT option (I have not tested)

- 178
- 1
- 4
-
It is pretty expensive! If $99 were only for a class-room, that would be ok, but still the children hardly could by it for experimenting at home. – Valentin H Aug 06 '14 at 09:25
It's an old post, but I'll answer anyway. Enchanting looks interesting, and seems to be still an active project. I would actually take the original Scratch (1.4), as it's is more familiar and reliable. It's easy to interface hardware with Scratch using the remote sensor protocol. I use a simple serial interface (over a USB-adapter) which provides 3 digital inputs and 3 digital outputs. With that, it's possible to implement projects such as traffic lite, light/water/heat-sensors, using only lets, resistors, reed-contacts, photo-transistors, switches, PTSs. The costs are < 5$ For some motor-based projects like factory belts, elevator, etc. There is not much more required, a battery and a couple of transistors/relais/motor driver.

- 7,240
- 12
- 61
- 111