Giter Site home page Giter Site logo

antonvh / mpy-robot-tools Goto Github PK

View Code? Open in Web Editor NEW
35.0 9.0 8.0 2.38 MB

The library is built to be installed on a SPIKE Prime or LEGO MINDSTORMS Robot Inventor hub. It helps with Bluetooth communication, animation, and motor synchronization.

Home Page: https://antonsmindstorms.com

License: GNU General Public License v3.0

Python 100.00%
micropython lego lego-mindstorms robotics

mpy-robot-tools's People

Contributors

antonvh avatar rhumbertgz avatar spudgunman 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpy-robot-tools's Issues

`stop_action` is not used, instead it is hardcoded

self.write(0x0D, 0x00, 0x81, self.__PORTS[port], 0x11, 0x0D, degree_bits[0], degree_bits[1], degree_bits[2], degree_bits[3], speed, max_power, 0x7E)

self.write(0x0B, 0x00, 0x81, self.__PORTS[port], 0x11, 0x09, time_bits[0], time_bits[1], speed, max_power, 0x00)

self.write(0x0D, 0x00, 0x81, self.__PORTS[port], 0x11, 0x0B, degree_bits[0], degree_bits[1], degree_bits[2], degree_bits[3], speed, max_power, 0x7E)

error in rc.py

When calling:
rcv = RCReceiver(name="roto")
I get this error:

  File "<stdin>", line 1, in <module>
  File "../mpy_robot_tools/rc.py", line 44, in __init__
TypeError: unexpected keyword argument 'buffered'

Probably this has to do with incompatibility in the bt.py defined class:

class UARTPeripheral(BleUARTBase):
    """
    Class for a Nordic UART BLE server/peripheral.
    It will advertise as the given name and populate the UART services and characteristics
    """

    def __init__(self, name="robot", ble_handler: BLEHandler = None, additive_buffer=True):
        super().__init__(additive_buffer)

where no parameter buffered is defined.

Incompatible arch

I get the following when I try to import anything:

Traceback (most recent call last):
File "", line 1, in
ValueError: incompatible .mpy arch

My sys.implementation.mpy is 517

bluepadtest

https://github.com/antonvh/mpy-robot-tools/blob/master/Example%20projects/bluepad_test.py

Doesnt appear to be working for me.
I am following the steps at https://antonsmindstorms.com/2022/03/22/python-ps4-gamepad-connection-robot-inventor-and-spike-prime-hub/.

And when it came to test the gamepad. I get the following error:
Traceback (most recent call last): File "programrunner/init.py", line 1, in start_program File "init.mpy", line 10ImportError: no module named 'projects.mpy_robot_tools.mshub'

The console from the install of the mpy files is the following:
[19:59:23.189] > Hash generated: f8ed79b7a3ac2517af0269b044b269af98a3d1585c79b9726fbdcfde424fcdfd

[19:59:23.217] > Writing file helpers.mpy

[19:59:23.277] > writing helpers.mpy to folder /projects/mpy_robot_tools

[19:59:23.442] > Finished writing helpers.mpy, Checking hash.

[19:59:23.481] > Hash generated: 7174067aa52f5ca8e575eb9fe7518227a7ab93c4eaeae52a8e4a3b3aabfd6908

[19:59:23.504] > Writing file serialtalk

[19:59:23.570] > Writing file serialtalk/init.mpy

[19:59:23.604] > writing serialtalk/init.mpy to folder /projects/mpy_robot_tools

[19:59:23.739] > Finished writing serialtalk/init.mpy, Checking hash.

[19:59:23.807] > Hash generated: 9f2caf23a8ab6961a6149dcf286cf1a6e5675a2634de84f53432a514dd72cf32

[19:59:23.846] > Writing file serialtalk/mshub.mpy

[19:59:23.892] > writing serialtalk/mshub.mpy to folder /projects/mpy_robot_tools

[19:59:24.031] > Finished writing serialtalk/mshub.mpy, Checking hash.

[19:59:24.098] > Hash generated: cba9815b037de93164b881430c323f5cd82b5a68645d988ba77829c1bf193576

[19:59:24.138] > Writing file serialtalk/serialtalk.mpy

[19:59:24.180] > writing serialtalk/serialtalk.mpy to folder /projects/mpy_robot_tools

[19:59:24.358] > Finished writing serialtalk/serialtalk.mpy, Checking hash.

[19:59:24.482] > Hash generated: 6c818007ffa05939bf6e7da3baf470efc158c6e5ce923cebb9f0fec9c0fae6f5

Note: I didnt flash it as, I believe its flashed before it arrived. @antonvh

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.