GithubHelp home page GithubHelp logo

maarten-pennings / lego-mindstorms Goto Github PK

View Code? Open in Web Editor NEW
87.0 12.0 13.0 96.51 MB

Hints, tips, and tricks for the LEGO Mindstorms products (RCX, NXT, EV3, Robot Inventor).

Batchfile 1.07% Python 7.52% Jupyter Notebook 91.41%
lego-mindstorms nxt rcx ev3 mindstorms lego

lego-mindstorms's People

Contributors

maarten-pennings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lego-mindstorms's Issues

Info: Spike with µPIDE

You describe how to use the right COM port and a terminal program. That's totally fine. But a way easier solution ist to run an IDE like µPIDE.

It works out of the box with the spike. It's auto detected (no com port fiddling) and you can browse the spikes file system, up- and download files and use REPL.

debug mode on lego app /osx

cd ~/Library/Containers/com.lego.retail.mindstorms.robotinventor/Data/Library/Application\ Support/MINDSTORMS_ROBOTINVENTOR/

userSettings.json
Go to the end of the line/file, and add the following string properly: ,"ui.debug":true}
Mind the quote style and adding it into the json format to function.
Debug menu and new debug block functions to add

Bluetooth direct connection to computer

Hello Marten,
I am trying to connect the robot directly to the computer via bluetooth. I want to bypass mindstorms and pybricks applications. Do you know how should i do it?

Example program for Gelo - using generators as coroutines

Hi Maarten, I like the work you are doing with generators and iterators recently. I would like to share a program that I have been working on.

https://gist.github.com/dlech/973714729f33b67092b736f541820233

Here are some of the more interesting points:

  1. I'm using zip (built-in function) and zip_longest (from itertools in Python standard library) as some fundamental operators for running generators in parallel. This are somewhat analogous to Promise.race() and Promise.all() in JavaScript or asyncio.wait() with return_when=FIRST_COMPLETED and return_when=ALL_COMPLETED respectively in Python.

    In the future, I would like to simplify and improve these a bit. For zip, it should be modified to call generator.close() on all unfinished generators to cancel them after the first one completes. This will "cancel" them, which is useful for things like stopping motors or sound playback. zip_longest() could be simplified to not collect and return the values yielded by the generators.

  2. It is using the low level hub API to create new classes, like the Motor class that have generator versions of the methods.

  3. Along the same lines, it implements a new Timer class that has millisecond resolution since the one from LEGO only has 1 second resolution.

  4. There is a run_tasks() function that acts kind of like zip_longest(), but it takes generator functions instead of the generator returned by a generator function as arguments. This is intended for the most high-level tasks of a program. Instead of running things as fast as possible, it tries to run everything in a 10 millisecond loop. My experience has been that this time works well for most control/feedback loops. But this means timers will only have a 10 ms resolution (unless you override the default interval).

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.