Makecode Arcade, pybricks/pybricksdev, LEGO PF/PU, open source Robots with docs, wokwi
A few cool tools for Python (and STEM) in application, OTOH: ## Makecode Makecode Arcade has Blocks <-> Python <-> JS - New Project > Blocks > +Extensions > Robotics > ~List all [Makecode-compatible devices] ### vscode.dev - https://vscode.dev/ - Install "python" extension - Install "pyodide" extension - Install "jupyter" extension - Open from GitHub - Run the Python in the Jupyter notebook locally - Save to GitHub ## Pybricks - Web: https://pybricks.com/ - Src: https://github.com/pybricks - Code and Flash LEGO smart hubs with Python - Flashes Python to the device WebBluetooth ## Pybricksdev - Docs: https://docs.pybricks.com/en/latest/ - Src: https://github.com/pybricks/pybricksdev - Flash LEGO smart hubs with Python - USB, ## pylgbst - Src: https://github.com/undera/pylgbst - https://github.com/undera/pylgbst/blob/master/docs/MoveHub.md - https://github.com/undera/pylgbst/blob/master/examples/vernie/go_towards_lig... ### LEGOs with voltage; PU, EV3/NXT, PU - https://pv-productions.com/product/powered-up-to-ev3-nxt-adapter/ - https://pv-productions.com/product/powered-up-to-power-functions-adapter/ - https://pv-productions.com/product/power-functions-to-powered-up-adapter/ - https://www.biasedlogic.com/index.php/lego-powered-up-connector/ - -> "Pin", "Breadboard", "Breakout board", "HAT" - https://en.wikipedia.org/wiki/UL_(safety_organization)#Standards_for_Electri... ## Modality Integrated Learning - Lights (Bits as Voltage to Photons) - Sensors (Physical phenomena to Bits) - Servos (Rotations in radians or degrees,) - Motors (RPMs) - Things that spin; things that have mechanical angular momentum - All power tools, basically - https://www.youtube.com/results?search_query=lego+machines - https://www.youtube.com/watch?v=M1-YeqGynlw - https://www.youtube.com/watch?v=ykIYP4z-eMk > I Put 44 Mechanisms In 1 LEGO® Machine! You'll see the testing of more than 40 Mechanical Principles/Mechanisms using LEGO® Technic parts ### LEGOs with voltage; PF, EV3/NXT, PU IIUC: - There are at least 3 connector specs in the LEGO(R) ecosystem: - PF: Power Functions (2009+) - LPF2: LEGO Power Functions 2 - Technic - WeDo 2.0, SPIKE Prime - NXT/EV3 (2006/2013) - PU: Powered Up (2016+) - Boost - Move Hub with 2x Ports, 2x embedded motors, and BLE - City Trains - Hub with 2x Ports, and BLE - https://pv-productions.com/product/powered-up-to-ev3-nxt-adapter/ - https://pv-productions.com/product/powered-up-to-power-functions-adapter/ - https://pv-productions.com/product/power-functions-to-powered-up-adapter/ - https://pv-productions.com/product/powered-up-splitter-cable/
- https://www.biasedlogic.com/index.php/lego-powered-up-connector/ - -> "Pin", "Breadboard", "Breakout board", "HAT" - https://en.wikipedia.org/wiki/UL_(safety_organization)#Standards_for_Electri... - https://www.lego.com/en-us/themes/powered-up/about - (e.g.) LEGO Boost Creative Toolbox has 1x LEGO Move Hub (which works with their apps, pybricks, and pylgbst,), has 2 ports, and 2 integrated motors - https://www.google.com/search?q=building+instructions+for+lego+17101 - Sometimes, PDF Building Instructions are easier to work with than an app on a tablet that keeps going to sleep. - https://trevorsandy.github.io/lpub3d/ - This looks like a good way to document 3d building instructions. - Is there a way to connect LEGO PU motors and sensors to a Pi with a 2x20 Pin (~IDE) HAT - https://www.raspberrypi.com/products/build-hat/ > The Build HAT also supports motors and sensors from the LEGO® MINDSTORMS® Robot Inventor kit, as well as most other LEGO devices that use an LPF2 connector. - Does that mean it works with PU, or is there no product to connect LEGO PU motors from our one kit to our one Pi ? - https://uk.pi-supply.com/collections/all-raspberry-pi-hats-and-phats/product... - USB to 2x20 Pin GPIO ### SunFounder - Src: https://github.com/sunfounder - Docs: https://docs.sunfounder.com/projects/thales-kit/en/latest/components/resisto... - Docs: https://docs.sunfounder.com/projects/thales-kit/en/latest/micropython/for_mi... ### Elecfreaks - Src: https://github.com/elecfreaks - Docs: https://www.elecfreaks.com/learn/en/ - https://shop.elecfreaks.com/products/elecfreaks-micro-bit-32-in-1-wonder-bui... - Microbit to 2x motors and 16 PWMs - https://www.amazon.com/SEEMEY-Power-Function-Kit-Pins-Gears-Axles-Compatible... - https://www.aliexpress.us/w/wholesale-lego-technic.html ### Yahboom - Src: https://github.com/YahboomTechnology - Docs: http://www.yahboom.net/download - Docs: inurl:http://www.yahboom.net/study/ ### Freenove - Src: https://github.com/Freenove - Docs: https://www.freenove.com/tutorial ### Wokwi Simulator - https://wokwi.com/ - https://wokwi.com/projects/new/micropython-pi-pico - What is PWM? How to fade an LED on and off, control a servo, control a case fan with variable speed - In the Wokwi simulator, when you pause || the circuit that runs your {Python,} code, and then hover over a pin, it shows the pin state; high, low, - Makecode Arcade and TinkerCode are also a simulators that don't require actual devices ## Actual work tho, - https://github.com/marketplace/actions/setup-micromamba - [ ] Write a Dockerfile that installs your stuff - [ ] Make sure that your repo with an /environment.yml works with: ```sh pip install pipx; pipx install jupyter-repo2docker # or just: pip install jupyter-repo2docker jupyter-repo2docker --no-build --debug . jupyter-repo2docker --no-build --debug https://github.com/binder-examples/conda ``` - https://repo2docker.readthedocs.io/en/latest/usage.html - https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html - https://github.com/binder-examples/conda
Add'l Robotics kits for STEM with python Code in git, and Docs: ## Hiwonder - Src: https://github.com/Hiwonder - Docs: https://www.hiwonder.com.cn/store/learn?key=microbit - Docs: https://www.hiwonder.com.cn/store/learn?key=raspberry - Docs: https://www.hiwonder.com.cn/store/learn/6.html ## executablebooks/, MyST-Markdown, nbdev - Src: https://github.com/executablebooks ### MyST - Docs: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.htm... ### Jupyter-Book (Sphinx, MyST-Parser,) - Web: https://jupyterbook.org/ ### nbdev - Src: https://github.com/fastai/nbdev ### Split an nb cell at cursor: - Ctrl-Shift-Dash - Ctrl-m Dash (Colab emacs mode) - Custom split cell shortcut: - https://stackoverflow.com/questions/49485753/jupyter-notebook-ctrlshift-spli... ### Run one cell of a notebook - Ctrl-Enter -- Run one input cell at a time (potentially out-of-sequence) - Ctrl-Shift-Enter -- Run a cell and The 'Run Cell' and 'Run Cell and Append a New Cell' Keyboard shortcuts are different in other Jupyter Notebook implementations like VScode and Colab IIRC. ### the percent format, for .py files "^# %%" is the notebook input cell delimiter prefix in the `percent` format representation of Jupyter Notebooks' (input cells just). ```python # %% [markdown] # This is a multiline # Markdown cell # %% [markdown] # Another Markdown cell # %% # This is a code cell class A(): def one(): return 1 def two(): return 2 ``` ... Open Source Code, Documentation quality (and Durability of cables and connectors) On Mon, Dec 11, 2023 at 3:40 PM Wes Turner <wes.turner@gmail.com> wrote:
A few cool tools for Python (and STEM) in application, OTOH:
## Makecode Makecode Arcade has Blocks <-> Python <-> JS - New Project > Blocks > +Extensions > Robotics > ~List all [Makecode-compatible devices]
### vscode.dev - https://vscode.dev/ - Install "python" extension - Install "pyodide" extension - Install "jupyter" extension - Open from GitHub - Run the Python in the Jupyter notebook locally - Save to GitHub
## Pybricks - Web: https://pybricks.com/ - Src: https://github.com/pybricks - Code and Flash LEGO smart hubs with Python - Flashes Python to the device WebBluetooth
## Pybricksdev - Docs: https://docs.pybricks.com/en/latest/ - Src: https://github.com/pybricks/pybricksdev - Flash LEGO smart hubs with Python - USB,
## pylgbst - Src: https://github.com/undera/pylgbst - https://github.com/undera/pylgbst/blob/master/docs/MoveHub.md - https://github.com/undera/pylgbst/blob/master/examples/vernie/go_towards_lig...
### LEGOs with voltage; PU, EV3/NXT, PU - https://pv-productions.com/product/powered-up-to-ev3-nxt-adapter/ - https://pv-productions.com/product/powered-up-to-power-functions-adapter/ - https://pv-productions.com/product/power-functions-to-powered-up-adapter/ - https://www.biasedlogic.com/index.php/lego-powered-up-connector/ - -> "Pin", "Breadboard", "Breakout board", "HAT" - https://en.wikipedia.org/wiki/UL_(safety_organization)#Standards_for_Electri...
## Modality Integrated Learning - Lights (Bits as Voltage to Photons) - Sensors (Physical phenomena to Bits) - Servos (Rotations in radians or degrees,) - Motors (RPMs) - Things that spin; things that have mechanical angular momentum - All power tools, basically - https://www.youtube.com/results?search_query=lego+machines - https://www.youtube.com/watch?v=M1-YeqGynlw - https://www.youtube.com/watch?v=ykIYP4z-eMk > I Put 44 Mechanisms In 1 LEGO® Machine! You'll see the testing of more than 40 Mechanical Principles/Mechanisms using LEGO® Technic parts
### LEGOs with voltage; PF, EV3/NXT, PU
IIUC:
- There are at least 3 connector specs in the LEGO(R) ecosystem: - PF: Power Functions (2009+) - LPF2: LEGO Power Functions 2 - Technic - WeDo 2.0, SPIKE Prime - NXT/EV3 (2006/2013) - PU: Powered Up (2016+) - Boost - Move Hub with 2x Ports, 2x embedded motors, and BLE - City Trains - Hub with 2x Ports, and BLE
- https://pv-productions.com/product/powered-up-to-ev3-nxt-adapter/ - https://pv-productions.com/product/powered-up-to-power-functions-adapter/ - https://pv-productions.com/product/power-functions-to-powered-up-adapter/ - https://pv-productions.com/product/powered-up-splitter-cable/
- https://www.biasedlogic.com/index.php/lego-powered-up-connector/ - -> "Pin", "Breadboard", "Breakout board", "HAT" - https://en.wikipedia.org/wiki/UL_(safety_organization)#Standards_for_Electri... - https://www.lego.com/en-us/themes/powered-up/about
- (e.g.) LEGO Boost Creative Toolbox has 1x LEGO Move Hub (which works with their apps, pybricks, and pylgbst,), has 2 ports, and 2 integrated motors - https://www.google.com/search?q=building+instructions+for+lego+17101 - Sometimes, PDF Building Instructions are easier to work with than an app on a tablet that keeps going to sleep. - https://trevorsandy.github.io/lpub3d/ - This looks like a good way to document 3d building instructions.
- Is there a way to connect LEGO PU motors and sensors to a Pi with a 2x20 Pin (~IDE) HAT - https://www.raspberrypi.com/products/build-hat/ > The Build HAT also supports motors and sensors from the LEGO® MINDSTORMS® Robot Inventor kit, as well as most other LEGO devices that use an LPF2 connector. - Does that mean it works with PU, or is there no product to connect LEGO PU motors from our one kit to our one Pi ?
- https://uk.pi-supply.com/collections/all-raspberry-pi-hats-and-phats/product... - USB to 2x20 Pin GPIO
### SunFounder - Src: https://github.com/sunfounder - Docs: https://docs.sunfounder.com/projects/thales-kit/en/latest/components/resisto... - Docs: https://docs.sunfounder.com/projects/thales-kit/en/latest/micropython/for_mi...
### Elecfreaks - Src: https://github.com/elecfreaks - Docs: https://www.elecfreaks.com/learn/en/
- https://shop.elecfreaks.com/products/elecfreaks-micro-bit-32-in-1-wonder-bui... - Microbit to 2x motors and 16 PWMs - https://www.amazon.com/SEEMEY-Power-Function-Kit-Pins-Gears-Axles-Compatible... - https://www.aliexpress.us/w/wholesale-lego-technic.html
### Yahboom - Src: https://github.com/YahboomTechnology - Docs: http://www.yahboom.net/download - Docs: inurl:http://www.yahboom.net/study/
### Freenove - Src: https://github.com/Freenove - Docs: https://www.freenove.com/tutorial
### Wokwi Simulator - https://wokwi.com/ - https://wokwi.com/projects/new/micropython-pi-pico - What is PWM? How to fade an LED on and off, control a servo, control a case fan with variable speed - In the Wokwi simulator, when you pause || the circuit that runs your {Python,} code, and then hover over a pin, it shows the pin state; high, low, - Makecode Arcade and TinkerCode are also a simulators that don't require actual devices
## Actual work tho,
- https://github.com/marketplace/actions/setup-micromamba - [ ] Write a Dockerfile that installs your stuff - [ ] Make sure that your repo with an /environment.yml works with: ```sh pip install pipx; pipx install jupyter-repo2docker # or just: pip install jupyter-repo2docker jupyter-repo2docker --no-build --debug . jupyter-repo2docker --no-build --debug https://github.com/binder-examples/conda ``` - https://repo2docker.readthedocs.io/en/latest/usage.html - https://mybinder.readthedocs.io/en/latest/examples/sample_repos.html - https://github.com/binder-examples/conda
participants (1)
-
Wes Turner