Giter Club home page Giter Club logo

snap-nxt's Introduction

snap-nxt v1.0

A block module and local server for Snap! to interface with the Mindstorms NXT.

#Requirements

  • A Mindstorms NXT
  • Python 2.6+
  • The nxt-python module for Python.

#Getting Started

  • Load Snap! in your browser window.
  • Import the nxt.xml file.
  • Connect your NXT to your computer via USB cable.
  • In a command line, navigate to the directory where you are storing these files.
  • As a root user, type python snap.py.
  • The program should print something like Now serving on port 1330.
  • Enjoy!

#NXT stuff If you connect the sensors, connect them in the following configuration:

  • Port 1 - Touch
  • Port 2 - Sound
  • Port 3 - Light
  • Port 4 - Ultrasonic

#Credits

snap-nxt's People

Contributors

hyperobject avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

snap-nxt's Issues

documentation

Hi
Is there documentation how to add and interface custom blocks on SNAP?
We have Embedded Linux board which runs SNAP https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-WIFI/ and I would like to add GPIO, SPI, UART, I2C controls as SNAP building blocks.
I probably will do it looking at your code, but if somewhere there is documentation and description how to create and interface custom blocks would help me a lot
Thanks!

I used your code for Raspberry PI GPIOs

Hi,

I am writing an article on using the Snap! to program with the Raspberry Pi's GPIOs. I have borrowed heavily from your code, so I owe you some hearty thanks for that. If you would like to take a look, my stuff is at

https://github.com/pbrown66/snap-RPi

I am not a very good programmer, so if you would like to contribute or make it yours, please feel free. I will not have much time to pursue this after publishing the article. Besides, it is more a proof of concept for me.

Cheers

Paul

P.S.: I tried to contact you via your blog, but I kept getting a 404 error when I tried to post a comment.

Cannot get this to work...

Instructions say to run python snap.py however can only find Snap-NXT.py which throws the following error (when run with python2, as Python 3 throws syntax errors):

Snap-NXT by Technoboy10 Traceback (most recent call last): File "Snap-NXT.py", line 126, in <module> import nxt.bluesock File "/usr/lib/python2.7/site-packages/nxt/bluesock.py", line 18, in <module> import lightblueglue as bluetooth File "/usr/lib/python2.7/site-packages/nxt/lightblueglue.py", line 17, in <module> import lightblue ImportError: No module named lightblue

I'm on Arch Linux, all up to date. Have both Python 2.7.18 and Python 3.8.3

I just cloned the repo, is there somewhere else I can get the snap.py file

BlockedException: Blocked!

Hi, I'm trying to play with snap-nxt, but I'm not sure if I do the correct things:
After run "python Snap-NXT.py" a message with a URI is shown. Then I open my browser, paste the URI and Snap is ready. I go to "Variables" category and I can see new blocks.
Then I drag and drop a head "When green flag clicked" and a "move motor a 360 degrees" block. And finally I click the green flag. But nothing happends.
The output in the terminal is this:

Exception happened during processing of request from ('127.0.0.1', 51595)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 651, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
f = self.send_head()
File "Snap-NXT.py", line 18, in send_head
m_a.turn(power, degrees)
File "/usr/lib/python2.7/dist-packages/nxt/motor.py", line 211, in turn
raise BlockedException("Blocked!")
BlockedException: Blocked!

What might be the problem?

Thanks in advance.

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.