View Full Version : Serial variable
Newbie6
09-25-2006, 02:51 PM
I would like to assign a variable in Alice 2.0 that represents incoming serial data. The port will be sending different numbers throughout the program. How could I do this? Would I have to change the alice source code?
Newbie6
09-26-2006, 05:57 AM
Where can I get a final txt version of the Alice 2.0 source code? When I download the source code, it gives me a large amount of tx files for different parts of the code. Also, i'm not sure,but I think the source code is written in Java and Python. Where can I get a full python script that I can run in the IDLE? I would also like a full version of the Java script too.
thanks,
Newbie6
Newbie6
09-26-2006, 03:46 PM
OK. I enabled Python Scripting for alice, but how would I do something simple like:
do
let Y = val(com.4)
loop
and then have Y be used in my program?
thanks,
Newbie6
Mr Nemo
09-26-2006, 09:02 PM
I laud you for being a trailblazer, but what exactly do you need serial input for, a joystick?:confused:
DrJim
09-27-2006, 08:38 PM
Like MrNemo, I'd like to know what exactly you mean by trying to get data from a serial port? By this do you mean something like a USB port - if so I think you have to go through Windows to communicate with the driver. I have no idea whether or not you can do this in Alice but I sort of doubt it.
Also exactly what did you do when you "enabled Python scripting?" Did you do something in Alice or, since you were looking at the code, did you actually do something there and recompile?
Newbie6
10-04-2006, 03:23 PM
I changed the "false" to "true" in the XML file Alice Perferences right next to enable scripting, What kind of Python scripts are allowed in Alice? I tried making a variable, and plugged in a script defined response, and an error occured. If the alice python editor can really run python code, there is absolutely no way it couldn't work
Newbie6
10-04-2006, 03:25 PM
Well these are the most important questions:
going in one direction, where can I find a complete single txt file of the alice python source code?
the other way was to bring in the serial data using the alice python script editor, and my questions above apply to that.
Newbie6
10-04-2006, 03:27 PM
"I laud you for being a trailblazer, but what exactly do you need serial input for, a joystick?"
-I don't understand what you mean by laud and trailblazer...?
Mr Nemo
10-04-2006, 08:34 PM
The expression literally means that I praise you for going where no man has gone before.:D
DrJim
10-04-2006, 09:17 PM
Apparently Alice 1.0 supported Python, see
http://www.alice.org/bvw02fall/scripting/scripting.html
A source for Alice 1.0 is listed in Wiki but I don't know how up to date it is.
Alice 2.0 doesn't, from what I can tell, but does support something pretty close, see
http://www.westga.edu/~drocco/alice/scripting.html
This is already beyond my understanding of Python/Jython but might give you a start. Have fun blazing trails. (If you really didn't understand the reference, a "blaze" is a mark made on something, usually a tree, to show where a trail is for future travelers. The trail blazer has a challenge, since no one has gone before him to figure out how to get where he wants to go.)
Jim
Added Note: I did try the hello_network world on the second web site and it seems to work - at least I got the same message when I ran Alice and also accessed the URL directly from IE.
Newbie6
10-05-2006, 05:07 AM
Thanks for your help guys.
Newbie6
10-05-2006, 05:51 AM
Well it does seem a bit strange that Alice 2.0 doesn't have one complete source code...
According to the programming team, Alice 2.0 was completely rewritten in Java. There are trace elements of Python, but it is not active and not complete. Scripting development was worked on by one of our crew but then dropped. You are free to try to make scripting work, as the software is open source; however, you are probably going to find it a frustrating experience. It's not simply an on/off switch that we disabled for all but advanced users -- it was never completed.
Newbie6
10-05-2006, 01:47 PM
Then were can I download Alice 1.0 so I can finish my project there?