Difference between revisions of "Nxt-python-osx"

From Earlham CS Department
Jump to navigation Jump to search
(New page: == OSX == * These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too. * These instructions assume you already have Python, you can check this b...)
 
(OSX)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
Back to [https://wiki.cs.earlham.edu/index.php/Robotics-2010 Robotics Main Page]
 +
----
 
== OSX ==
 
== OSX ==
 
* These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too.
 
* These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too.
Line 9: Line 11:
 
  $ sudo python setup.py install # lightblue
 
  $ sudo python setup.py install # lightblue
 
  $ sudo python setup.py install # nxt-python-1.1
 
  $ sudo python setup.py install # nxt-python-1.1
* Simon Levy's script (bluetooth.py*) must be in the directory that you are running the interpreter in for the Bluetooth interface to work.  <i>Update: Release v1.1 appears to have integrated this script into the NXT-Python library.</i>
+
* Simon Levy's script (bluetooth.py*) must be in the directory that you are running the interpreter in for the Bluetooth interface to work.  <i>Update: Release v1.1.1 appears to have integrated this script into the NXT-Python library.  It doesn't seem to work though unless Simon's scripts are in the Python interpreter's working directory.</i>
 
* For USB support you will need PyUSB, you can download it from its SourceForge [http://sourceforge.net/projects/pyusb site] and then install it.
 
* For USB support you will need PyUSB, you can download it from its SourceForge [http://sourceforge.net/projects/pyusb site] and then install it.
 
* Once you think all the plumbing is working correctly you can use the query.py script in the [http://cs.earlham.edu/~charliep/courses/cs282/source CS282 source] directory to test it.  <b>N.B.</b> Change the BlueTooth ID in query.py to match your NXT.
 
* Once you think all the plumbing is working correctly you can use the query.py script in the [http://cs.earlham.edu/~charliep/courses/cs282/source CS282 source] directory to test it.  <b>N.B.</b> Change the BlueTooth ID in query.py to match your NXT.

Latest revision as of 14:24, 24 February 2010

Back to Robotics Main Page


OSX

  • These instructions were tested under Snow Leopard (10.6.2), they will probably work under Leopard too.
  • These instructions assume you already have Python, you can check this by typing python at a shell (aka Terminal) prompt. The Python interpreter should start, read the on-screen instructions to see how to exit it.
  • Frequently it's easier to get USB working than it is Bluetooth, and they use much of the same underlying plumbing.
  • You should test each step as you go, most of the packages have example code you can use to do this.
  • Each of the steps below require that a package or files to be downloaded to your computer first. They are all available in the CS282 packages directory. Once you have downloaded the zip file you can un-zip it, cd to the created directory, and run the command listed below for that directory.
$ sudo python ez_setup.py -U setuptools # setuptools
$ sudo python setup.py install # py2app
$ sudo python setup.py install # lightblue
$ sudo python setup.py install # nxt-python-1.1
  • Simon Levy's script (bluetooth.py*) must be in the directory that you are running the interpreter in for the Bluetooth interface to work. Update: Release v1.1.1 appears to have integrated this script into the NXT-Python library. It doesn't seem to work though unless Simon's scripts are in the Python interpreter's working directory.
  • For USB support you will need PyUSB, you can download it from its SourceForge site and then install it.
  • Once you think all the plumbing is working correctly you can use the query.py script in the CS282 source directory to test it. N.B. Change the BlueTooth ID in query.py to match your NXT.