Samstag, 2. Oktober 2010

University is catching up on me - any help?

I was hoping to get the communication with the Nao (or at least with choregraphe) up and running by Monday...

Well, looks like I have a ton of other things to do for university and that's not gonna happen :-(

I have not come that far yet. This is the way I understand it: Choregraphe is just a programme for stringing together individual movements. These movements are programmed in python.
So what I need to do is figure out how to read serial import with python. 

Only problem. Today is the first time I even opened a python manual. However, it seems simple enough and writing interpreted code is sort of fun. (Its like you have a super smart text editor, which talks back to you while you write...  I like it :-)..

So this is how far I got, up until now.

Physical set up:

A potentiometer attached to my Arduino on analogue pin 4.

Arduino Code:


Python Code:
(using pySerial: http://pyserial.sourceforge.net/)



What needs to happen now?

a) (easy) The '1023\r\n' needs to be translated into an integer (I guess there are some string operators, which can allow me to do it. need to look that up again.)

b) (no idea how to do that as of yet.) Within choregraphe I need to write some code which will enable me to use the integer to define the angle of the servo in the elbow of the NAO.

So.

Who can help me?
Please?

As I said, I need to focus on other university things, and if anyone could give me some suggestions on how to go about this, it would be very much appreciated.

Keine Kommentare:

Kommentar veröffentlichen