|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 3 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 4 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 5 | + |
| 6 | +<head> |
| 7 | + <meta name="Author" content="Douglas P Lau, Marcus Wanner"/> |
| 8 | + <link href="nxt-python.css" rel="stylesheet" type="text/css"/> |
| 9 | + <title>NXT-Python</title> |
| 10 | +</head> |
| 11 | + |
| 12 | +<body> |
| 13 | +<h1>NXT-Python</h1> |
| 14 | + |
| 15 | +<h2>About</h2> |
| 16 | +<p> |
| 17 | + NXT-Python is a package for controlling a LEGO NXT robot using the |
| 18 | + Python programming language. |
| 19 | + It can communicate using either USB or Bluetooth. |
| 20 | + It is available under the Free Software Foundation's GPL license. |
| 21 | + It works on Linux, Windows, and Mac. |
| 22 | + Here's a sample program: |
| 23 | +</p> |
| 24 | +<pre> |
| 25 | +#!/usr/bin/env python |
| 26 | + |
| 27 | +import nxt.locator |
| 28 | + |
| 29 | +brick = nxt.locator.find_one_brick() |
| 30 | +name, host, signal_strength, user_flash = brick.get_device_info() |
| 31 | +print 'NXT brick name: %s' % name |
| 32 | +print 'Host address: %s' % host |
| 33 | +print 'Bluetooth signal strength: %s' % signal_strength |
| 34 | +print 'Free user flash: %s' % user_flash |
| 35 | +</pre> |
| 36 | +<h2>Requirements</h2> |
| 37 | +<ul> |
| 38 | + <li><a href='http://www.python.org'>Python 2.6</a></li> |
| 39 | + <li>For Bluetooth communication: |
| 40 | + <a href='http://org.csail.mit.edu/pybluez/'>PyBluez</a> |
| 41 | + </li> |
| 42 | + <li>For USB communication: |
| 43 | + <a href='http://sourceforge.net/projects/pyusb/'>PyUSB</a> |
| 44 | + </li> |
| 45 | +</ul> |
| 46 | +<h2>Download</h2> |
| 47 | +<ul> |
| 48 | + <li>Version 1.1<br/> |
| 49 | + —New motor functions, namely run() and stop().<br/> |
| 50 | + —Motor braking is finally usable!<br/> |
| 51 | + —Slightly changed behavior when there are errors searching for a brick.<br/> |
| 52 | + —New server functionality for light sensor illumination. |
| 53 | + <ul> |
| 54 | + <li><a href='http://NXT-Python.googlecode.com/files/nxt-python-1.1.zip'>nxt-python-1.1.zip</a> |
| 55 | + source ZIP archive</li> |
| 56 | + <li><a href='http://NXT-Python.googlecode.com/files/nxt-python-1.1.win32.exe'>nxt-python-1.1.win32.exe</a> |
| 57 | + source ZIP archive</li> |
| 58 | + <li><a href='http://NXT-Python.googlecode.com/files/nxt-python-1.1.win-amd64.exe'>nxt-python-1.1.win-amd64.exe</a> |
| 59 | + source ZIP archive</li> |
| 60 | + </ul> |
| 61 | + </li> |
| 62 | +</ul> |
| 63 | +<ul> |
| 64 | + <li>Version 1.0<br/> |
| 65 | + —Experimental support for motor braking.<br/> |
| 66 | + —Some improvements to the server module, like multiple motor control. |
| 67 | + <ul> |
| 68 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-1.0.zip'>NXT-Python-1.0.zip</a> |
| 69 | + source ZIP archive</li> |
| 70 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-1.0.win32.exe'>NXT-Python-1.0.win32.exe</a> |
| 71 | + source ZIP archive</li> |
| 72 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-1.0.win-amd64.exe'>NXT-Python-1.0.win-amd64.exe</a> |
| 73 | + source ZIP archive</li> |
| 74 | + </ul> |
| 75 | + </li> |
| 76 | +</ul> |
| 77 | +<ul> |
| 78 | + <li>Version 0.9<br/> |
| 79 | + —Now licensed under the GPLv3 or later.<br/> |
| 80 | + —Slightly improved accelerometer class.<br/> |
| 81 | + —A few improvements to nxt.server module. |
| 82 | + <ul> |
| 83 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.9.zip'>NXT-Python-0.9.zip</a> |
| 84 | + source ZIP archive</li> |
| 85 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.9.win32.exe'>NXT-Python-0.9.win32.exe</a> |
| 86 | + source ZIP archive</li> |
| 87 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.9.win-amd64.exe'>NXT-Python-0.9.win-amd64.exe</a> |
| 88 | + source ZIP archive</li> |
| 89 | + </ul> |
| 90 | + </li> |
| 91 | +</ul> |
| 92 | +<ul> |
| 93 | + <li>Version 0.8.1<br/> |
| 94 | + —Added prelimenary support for accelerometer sensors.<br/> |
| 95 | + —Important bugfix and some more commands for server.py. |
| 96 | + <ul> |
| 97 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.1.zip'>NXT-Python-0.8.1.zip</a> |
| 98 | + source ZIP archive</li> |
| 99 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.1.win32.exe'>NXT-Python-0.8.1.win32.exe</a> |
| 100 | + source ZIP archive</li> |
| 101 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.1.win-amd64.exe'>NXT-Python-0.8.1.win-amd64.exe</a> |
| 102 | + source ZIP archive</li> |
| 103 | + </ul> |
| 104 | + </li> |
| 105 | +</ul> |
| 106 | +<ul> |
| 107 | + <li>Version 0.8<br/> |
| 108 | + —Added server module, for a socket-based driver-like command-driven interface.<br/> |
| 109 | + —Some better help messages.<br/> |
| 110 | + —Added a logo! Yay!<br/> |
| 111 | + —More messages when brick.debug is set to 1. |
| 112 | + <ul> |
| 113 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.zip'>NXT-Python-0.8.zip</a> |
| 114 | + source ZIP archive</li> |
| 115 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.win32.exe'>NXT-Python-0.8.win32.exe</a> |
| 116 | + source ZIP archive</li> |
| 117 | + <li><a href='http://NXT-Python.googlecode.com/files/NXT-Python-0.8.win-amd64.exe'>NXT-Python-0.8.win-amd64.exe</a> |
| 118 | + source ZIP archive</li> |
| 119 | + </ul> |
| 120 | + </li> |
| 121 | +</ul> |
| 122 | +<ul> |
| 123 | + <li>Version 0.7<br/> |
| 124 | + —Added a get_sample() method to CompassSensor class.<br/> |
| 125 | + —Simplified return values for message_read() method.<br/> |
| 126 | + —Added message_test.py to examples directory. |
| 127 | + <ul> |
| 128 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.7.zip'>nxt_python-0.7.zip</a> |
| 129 | + source ZIP archive</li> |
| 130 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.7.tar.gz'>nxt_python-0.7.tar.gz</a> |
| 131 | + source tarball</li> |
| 132 | + </ul> |
| 133 | + </li> |
| 134 | +</ul> |
| 135 | +<ul> |
| 136 | + <li>Version 0.6<br/> |
| 137 | + —Added nxt.compass module for reading Mindsensors |
| 138 | + compass.<br/> |
| 139 | + —Added optional "host" and "name" arguments to |
| 140 | + find_bricks and find_one_brick methods. This allows multiple |
| 141 | + bricks to be controlled at the same time. (Thanks to Simon |
| 142 | + Levy!)<br/> |
| 143 | + —Added null-termination to messages for write_message. |
| 144 | + <ul> |
| 145 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.6.zip'>nxt_python-0.6.zip</a> |
| 146 | + source ZIP archive</li> |
| 147 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.6.tar.gz'>nxt_python-0.6.tar.gz</a> |
| 148 | + source tarball</li> |
| 149 | + </ul> |
| 150 | + </li> |
| 151 | + <li>Version 0.5 — Fixed timing problem with USB and Ultrasonic |
| 152 | + sensor |
| 153 | + <ul> |
| 154 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.5.zip'>nxt_python-0.5.zip</a> |
| 155 | + source ZIP archive</li> |
| 156 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.5.tar.gz'>nxt_python-0.5.tar.gz</a> |
| 157 | + source tarball</li> |
| 158 | + </ul> |
| 159 | + </li> |
| 160 | + <li>Version 0.4 — Improved sensor support + example programs |
| 161 | + <ul> |
| 162 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.4.zip'>nxt_python-0.4.zip</a> |
| 163 | + source ZIP archive</li> |
| 164 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.4.tar.gz'>nxt_python-0.4.tar.gz</a> |
| 165 | + source tarball</li> |
| 166 | + </ul> |
| 167 | + </li> |
| 168 | + <li>Version 0.3 — Ultrasonic sensor support added |
| 169 | + <ul> |
| 170 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.3.zip'>nxt_python-0.3.zip</a> |
| 171 | + source ZIP archive</li> |
| 172 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.3.tar.gz'>nxt_python-0.3.tar.gz</a> |
| 173 | + source tarball</li> |
| 174 | + </ul> |
| 175 | + </li> |
| 176 | + <li>Version 0.2 — USB support added |
| 177 | + <ul> |
| 178 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.2.zip'>nxt_python-0.2.zip</a> |
| 179 | + source ZIP archive</li> |
| 180 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.2.tar.gz'>nxt_python-0.2.tar.gz</a> |
| 181 | + source tarball</li> |
| 182 | + </ul> |
| 183 | + </li> |
| 184 | + <li>Version 0.1 — Initial release |
| 185 | + <ul> |
| 186 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.1.zip'>nxt_python-0.1.zip</a></li> |
| 187 | + <li><a href='http://home.comcast.net/~dplau/nxt_python/download/nxt_python-0.1.tar.gz'>nxt_python-0.1.tar.gz</a></li> |
| 188 | + </ul> |
| 189 | + </li> |
| 190 | +</ul> |
| 191 | + |
| 192 | +<h2>Installation</h2> |
| 193 | +<ul> |
| 194 | +<li>Either use the executable installer for your platform, or unzip the source and run "python setup.py install" in the same directory as setup.py. |
| 195 | +</li> |
| 196 | +<li> |
| 197 | +For USB on Linux: |
| 198 | +<ul> |
| 199 | +<li>Create "lego" group, and make your user-id a member</li> |
| 200 | +Open a terminal as root, and type: |
| 201 | +<pre>groupadd lego</pre> |
| 202 | +<pre>usermod -a -G lego [user-id]</pre> |
| 203 | +<li>Create a udev rule</li> |
| 204 | +Create file at /etc/udev/rules.d/70-lego.rules, containing one line: |
| 205 | +<pre>BUS=="usb", SYSFS{idVendor}=="0694", GROUP="lego", MODE="0660"</pre> |
| 206 | +</ul></li> |
| 207 | +</ul> |
| 208 | + |
| 209 | +<h2>Contact</h2> |
| 210 | +<p> |
| 211 | + NXT-Python was written by Douglas P Lau and Marcus Wanner. |
| 212 | + See README file in the package for contact information. |
| 213 | +</p> |
| 214 | +</body> |
| 215 | +</html> |
0 commit comments