David Lechner

Results 1570 comments of David Lechner

FYI, the best place to ask questions about anything Pybricks is https://github.com/orgs/pybricks/discussions Here is a basic script to get you started: ```python #!/usr/bin/env python3 # run this script on your...

It is, but the only available commands are to download a file or run a file that has already been downloaded to the hub or stop a running program. But...

There are some examples at https://pybricks.com/projects/tutorials/wireless/hub-to-device/

Yes, you can do that using `pybricksdev`.

I thinks this is what you are looking for https://github.com/pybricks/pybricksdev/blob/11667cb05427b2638fb475c1561fdfa380f59998/pybricksdev/connections/pybricks.py#L431-L447 You will need to compile the program first. You can have a look at the source of `run()` in the...

> 1. How can I use `hub.run()` without the tqdm progress bar You can set the environment variable `TQDM_DISABLE=1`. > 2\. How can I receive the data that the hub...

The hub program doesn't take into account newlines. Also, if everything is text-based, we should be able to use `stdin` directly instead of `stdin.buffer`. Also, the program on the computer...

It looks like this program still sends the OK at the end instead of at the beginning. Also, it looks like it is doing a `read()` instead of `readline()`.

The OK is still at the end instead of the beginning on the hub program and the PC program does not wait for OK before sending each command.

This is how I would do it: ### main.py ```python import asyncio import contextlib import os # must before tqdm import! os.environ["TQDM_DISABLE"] = "1" from pybricksdev.ble import find_device from pybricksdev.connections.pybricks...