Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Serial variable
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default Serial variable - 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?
   
Reply With Quote
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default 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
   
Reply With Quote
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default 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
   
Reply With Quote
WAY beyond me, man!
Old
Mr Nemo
Guest
 
Status:
Posts: n/a
Default WAY beyond me, man! - 09-26-2006, 09:02 PM

I laud you for being a trailblazer, but what exactly do you need serial input for, a joystick?
   
Reply With Quote
Couple of questions
Old
DrJim
Guest
 
Status:
Posts: n/a
Default Couple of questions - 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?
   
Reply With Quote
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default 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
   
Reply With Quote
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default 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.
   
Reply With Quote
Old
Newbie6
Guest
 
Status:
Posts: n/a
Default 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...?
   
Reply With Quote
Old
Mr Nemo
Guest
 
Status:
Posts: n/a
Default 10-04-2006, 08:34 PM

The expression literally means that I praise you for going where no man has gone before.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 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.

Last edited by DrJim; 10-04-2006 at 11:53 PM. Reason: Added note
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.