Alternative graphical programming environment -- Enchanting

Discussion specific to projects ideas and support.
clinton10
Posts: 28
Joined: 02 Nov 2010, 03:45
Location: Alberta, Canada
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by clinton10 »

I actually get unusual behaviour if I have an empty program -- it goes through linking and compiling and then says no NXT is present, regardless of whether one is.

Try this, please:

* Run the proper executable.
* Make a simple program -- when the Green Flag is pressed, play a sound
* Plug your NXT in with a USB cable, and turn it on. Wait for the menu screen to come up. (Your NXT has the LeJOS firmware on it, right?)
* Hit the green flag

If that doesn't work, try again, from the start, but, instead of running enchanting.exe, run verbose_enchanting.windows.bat. (You should be able to double-click on it). Can you copy and paste the text (or perhaps take a screenshot of the window) that shows what the Back End is doing?

One futher thing to try is to write out a program, choose File -> Export Code, and then see if you can manually compile it. (See an example here. If you `cd` to the directory you exported the program to, your commands will be similar to `nxjc myprogram.java` and `nxj myprogram`).

Cheers,
Clinton
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by dudmaster »

I did this:
  • Firmware update
  • Simple program with Green Flag
  • Tried to run it, but a "Java exception" occurred.
No luck. The file extension on the brick was .nxj. is that correct?
2Labz.com, My Website
clinton10
Posts: 28
Joined: 02 Nov 2010, 03:45
Location: Alberta, Canada
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by clinton10 »

dudmaster wrote:I did this:
  • Firmware update
  • Simple program with Green Flag
  • Tried to run it, but a "Java exception" occurred.
No luck. The file extension on the brick was .nxj. is that correct?
It sure sounds like you've done everything right. I'm sorry to hear that it is not working. .nxj is the correct extension for the file once it has been compiled and linked; all the files on the robot will end with .nxj.

Did the Java Exception occur on the computer or on the NXT? In either case, can you provide more details -- what does the message say?
jojoguy14
Posts: 155
Joined: 29 Sep 2010, 12:49
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by jojoguy14 »

You probably did, but just to make sure I wanted to ask. Did you set the Environment Variables on your computer? I know I almost forgot, so I wanted to make sure that you didn't.

jojoguy10
Creator of LEGO-X TechN'XT! (http://lego-x.com http://techn-xt.blogspot.com)
Known as jojoguy10
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by dudmaster »

It was a Java exception on my NXT, not my computer.

Exactly what it said on the screen:

Java Exception:
Class: 78
Method: 482
PC: 33318

Thanks, Dud
2Labz.com, My Website
clinton10
Posts: 28
Joined: 02 Nov 2010, 03:45
Location: Alberta, Canada
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by clinton10 »

dudmaster wrote:It was a Java exception on my NXT, not my computer.

Exactly what it said on the screen:

Java Exception:
Class: 78
Method: 482
PC: 33318

Thanks, Dud
Thank you, Dudmaster.

Would you mind either:
  • posting a screenshot of your script
  • e-mailing me the script
  • or describing each line of the script?
That way I can see if I can figure out what is wrong.
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by dudmaster »

Here:
ScreenShot.gif
2Labz.com, My Website
clinton10
Posts: 28
Joined: 02 Nov 2010, 03:45
Location: Alberta, Canada
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by clinton10 »

dudmaster wrote:Here:
ScreenShot.gif
Thank you, Dudmaster, that was what I was after.

I tried it out in my copy of Enchanting 0.0.3. I did not get the Java exception; the program seems to work, although it doesn't do much as it quits right after starting. You are using LeJOS version 0.85, are you not? I find it curious that we get different results.

I did, however, see a couple of bugs :( :

1) it appears that my code for handling comments has broken. (I was pleased with it, too -- it embeds the comment into the source file).
2) If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by dudmaster »

If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).


When i open it, it says ''Remote Sensor Connections enabled', and when i open a file, it says 'Remote Sensor Connections enabled'.

The Java nxj FW is : Version 0.85, Menu version 0.85!
2Labz.com, My Website
clinton10
Posts: 28
Joined: 02 Nov 2010, 03:45
Location: Alberta, Canada
Contact:

Re: Alternative graphical programming environment -- Enchanting

Post by clinton10 »

dudmaster wrote:
If you see the 'Remote Sensor Connections enabled' message more than once, your connection with the Back End is severed. This means that you can not start Enchanting v0.0.3 (which opens connections) and Open a saved file (which opens connections, invalidating the existing connection, and rendering communication with the back end impossible).


When i open it, it says ''Remote Sensor Connections enabled', and when i open a file, it says 'Remote Sensor Connections enabled'.

The Java nxj FW is : Version 0.85, Menu version 0.85!
I have written up both of the bugs.

The work around, until version 0.0.4 comes out (hopefully in less than a month) is to not open a file when you are working in Enchanting; just start new and put the script together. Alternatively, save all you like and export the code from the file menu and compile it manually.

Sorry about that.
Clinton
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests