tekiela / nxturtle

Control a LEGO Mindstorms robot like a Logo Turtle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NXTurtle Powered by You

NXTurtle is a mashup of the Python Turtle graphics for TK module and the LEGO Mindstorms driver NXT-Python.
It allows you to control a LEGO Mindstorms robot like the turtle known from the Logo programming language.

Status

This is a holiday project and barely tested.

Just to remind you

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Having said that: Have fun! Any feedback is welcome :-)

Get Started

  1. This project builds on Python and the NXT-Python driver.
    Read the installation instructions for details.
  2. Build your LEGO Mindstorms turtle. The robot should meet some requirements:
    Read the build instructions for details.
  3. Calibrate your turtle (also described in the build instructions).
  4. Read the Tutorial.

After this, you are ready to use it:

Example

from nxturtle import NXTurtle
yertle = NXTurtle(connect=True)

# [... some initialization ...]

# standard turtle action
yertle.pendown()
yertle.forward(10)
yertle.left(90)
yertle.home()

# and some more bricky capabilities
yertle.play_tone(440, 500)

Read the Tutorial for more...

Demo Video

About

Control a LEGO Mindstorms robot like a Logo Turtle

License:MIT License


Languages

Language:Python 100.0%