talltechdude / pynxc

A Python to NXC Converter for programming LEGO MINDSTORMS Robots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pynxc

A Python to NXC Converter for programming LEGO MINDSTORMS Robots

pynxc on GitHub is a continuation of a now stale project to convert Python programs to NXC so that you can use Python to program your NXT robots.

You can find the official site of the old project here: https://code.google.com/p/pynxc/

How to use

  1. Download and Install the LEGO NXT Fantom Driver from the LEGO Website
  2. Download and Install Git for Mac from here
  3. Download a zip or clone this repository to your local computer -
    1. Make a new folder somewhere in your OneDrive e.g. NXT Lego
    2. Open Terminal app
    3. Type cd in the Terminal and drag the folder into the Terminal window
    4. Run git clone https://github.com/talltechdude/pynxc.git from terminal to download the Python Library
    5. Run cd pynxc && sudo python setup.py install to install the library
  4. Download and Install Visual Studio Code
  5. Open Visual Studio Code and use File -> Open Workspace to open the pynxc.code-workspace file
  6. Connect your NXT brick via USB
  7. Open the src/helloworld.py or one of the Python files in the samples folder
  8. Press CMD+Shift+B to build and upload the program to your Robot (this will only work if using the provided pynxc.code-workspace file)
  • There are some sample scripts in the samples directory that you can try or learn new functions from

Documentation

How is this different

This version is trying to provide an API with which one (in these case especially kids) can program his or her NXT robot easily. The aim of this project is to make this API as Pythonic as possible, so that if programming robots with Python is someone's first encounter with Python they can then jump right into the Python world.

Build Status

About

A Python to NXC Converter for programming LEGO MINDSTORMS Robots

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 94.5%Language:C 5.5%