Git Product home page Git Product logo

mindstorms-nxt-playground-book's Introduction

Mindstorms NXT Playground Book for iOS

https://devpost.com/software/mindstorms-nxt-playground-book

Setup

brew tap ngs/formulae
brew cask install nxt-fantom-driver
brew install nexttool nbc

# Install firmware
wget http://bricxcc.sourceforge.net/lms_arm_nbcnxc.zip
unzip lms_arm_nbcnxc.zip
nexttool -firmware="lms_arm_nbcnxc/lms_arm_nbcnxc_132.rfw"

# Clone the repo
git clone [email protected]:ngs/mindstorms-nxt-playground-book.git

# Setup Xcode projects
cd mindstorms-nxt-playground-book/Server
swift package generate-xcodeproj

cd ../EasyNXC
swift package generate-xcodeproj

How to use

let nxt = NXT(name: "Hello NXT") // initialize robot

nxt.rotate(motor: .a, power: 100, angle: 145.0) // change angle of motor

// define sub routine
let sub = nxt.sub { nxt in
    nxt.forward(length: 100, turn: 0)
    nxt.wait(msec: 500)
    nxt.reverse(length: 100, turn: 0)
    nxt.wait(msec: 500)
}

// call sub routine
sub.call()

mindstorms-nxt-playground-book's People

Contributors

ngs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mindstorms-nxt-playground-book's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.