-
Notifications
You must be signed in to change notification settings - Fork 1.3k
REPL over BLE #3707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Would you be interested in a PR where the class myterminal:
def write(text: bytes) -> None:
pass
def read() -> bytes:
pass
def in_waiting() -> int:
pass These functions would be called from |
@iot49 My preference would be to finish the proper CircuitPython BLE support that uses nordic uart for REPL and a custom service for file transfers. We have an old issue for it here: #1010 and I'd love to chat with you about next steps if you have cycles to work on it. Basically, I want it to be core to CircuitPython, not just a hook from the VM, because it can work outside the VM then too. |
@tannewt Your plans are much further reaching. I believe both are needed. My specific need is to control a robot wirelessly (for obvious reasons). I program via jupyter (https://github.com/iot49/iot-kernel) and manage file upload/download over the repl. A dedicated solution (with microcontroller support) would be faster, but I have not found this to be a limitation in my experience. Not sure what "because it can work outside the VM then too" (I know little about the VM and even less about anything that's running outside it) refers to. In any case, my need is for |
What I mean by "outside the VM" is the code that runs after a crash or code.py completes. If you use |
The REPL connection library (https://github.com/iot49/iot-device) I have is very reliable. Plug, unplug, press reset, whatever - the devices come reliably online on go off. Very reliable; I never got locked out (try if you like :). However I once corrupted the flash when editing directly on it. Now I edit my sources on the host, and update with rsync (my implementation, runs over the REPL, however it is connected, soon by BLE). This way I also always have a backup (on the host). |
Thinking of it, This certainly would be a bad idea - while True: pass I protect in try:
# CircuitPython specific
import board
import digitalio
import storage
with digitalio.DigitalInOut(board.D0) as mode:
# mount CIRCUITPY if D0 pulled low ...
mode.pull = digitalio.Pull.UP
storage.remount("/", readonly=not mode.value)
except ImportError:
pass But I agree, that's definitely better handled with your solution. |
This was added in #4957 |
The import
multiterminal
is not available.I'd like to use it for repl over BLE (using the BLE uart class).
The text was updated successfully, but these errors were encountered: