Search found 3631 matches
- Thu Apr 22, 2021 8:26 pm
- Forum: MicroPython pyboard
- Topic: Please could some Pyboard 1.x users try this
- Replies: 1
- Views: 54
Re: Please could some Pyboard 1.x users try this
I managed to dig up 2 Kingston cards. The first was a 16 Gb card formatted for use on a Raspberry Pi (so multiple partitions). >>> import test Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/flash/test.py", line 7, in <module> File "/flash/sdcard.py", line 54, in __init...
- Mon Apr 19, 2021 11:29 pm
- Forum: General Discussion and Questions
- Topic: Protecting files on littlefs
- Replies: 3
- Views: 194
Re: Protecting files on littlefs
You can disable MSC access by turning it off in your boot.py file. However, you'll still be able to access the files using a tool like rshell. You'd need to disable the REPL in order to fully disable file access that way. That can all be circumvented by booting in safe mode: http://docs.micropython....
- Mon Apr 19, 2021 4:51 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: program controlled REPL ?
- Replies: 4
- Views: 193
Re: program controlled REPL ?
You could also just have your program collect bytes from stdin and 'eval' them when you get a full line (terminated by a CR - 0x0D).
- Sun Apr 11, 2021 4:32 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Receive data from PC
- Replies: 2
- Views: 150
Re: Receive data from PC
I put together an example which allows JSON data to be sent back and forth:
https://github.com/dhylands/json-ipc
https://github.com/dhylands/json-ipc
- Fri Apr 09, 2021 9:14 pm
- Forum: General Discussion and Questions
- Topic: Why does utime.gmtime() exist?
- Replies: 2
- Views: 148
Re: Why does utime.gmtime() exist?
In the unix version of MicroPython localtime and gmtime don't return the same results.
- Fri Apr 09, 2021 9:11 pm
- Forum: General Discussion and Questions
- Topic: How does file transfer to target device work?
- Replies: 3
- Views: 152
Re: How does file transfer to target device work?
I've also written a script https://github.com/dhylands/upy-example ... e_files.py that takes some files and generates a files.py file. You can then run that on the board using pyboard.py
I think using rshell is easier (disclaimer I wrote rshell).
I think using rshell is easier (disclaimer I wrote rshell).
- Thu Apr 08, 2021 7:17 pm
- Forum: MicroPython pyboard
- Topic: Pyboard.py raw repl : passing Micropython variable to Python
- Replies: 6
- Views: 386
Re: Pyboard.py raw repl : passing Micropython variable to Python
I think you can just call exec_raw_no_follow. However, you probably need to keep track of whether you're in raw-repl mode or not. Since you're not calling follow, you don't know if calling exit_raw_repl will actually work or not. If you call enter_raw_repl again, it will send a Control-C and if the ...
- Wed Apr 07, 2021 6:12 pm
- Forum: MicroPython pyboard
- Topic: pydfu.py run
- Replies: 1
- Views: 241
Re: pydfu.py run
I'm pretty sure that pydfu.py will only work on Linux and MacOS and not on Windows. You'll need to use dfu-util (command line) or one of the GUI based DFU loaders (like DFUse) under windows.
- Wed Apr 07, 2021 6:10 pm
- Forum: MicroPython pyboard
- Topic: Pyboard.py raw repl : passing Micropython variable to Python
- Replies: 6
- Views: 386
Re: Pyboard.py raw repl : passing Micropython variable to Python
"follow" collects output from the downloaded script. rshell calls exec_raw_no_follow, and then calls follow. This allows the host side to interact with the remote side when say transferring files. https://github.com/dhylands/rshell/blob/e2820f679aa06d40c35dbd5c626a0402047e28f8/rshell/main.py#L1610-L...
- Sat Apr 03, 2021 5:05 pm
- Forum: General Discussion and Questions
- Topic: I am at a loss of how to get started??
- Replies: 14
- Views: 490
Re: I am at a loss of how to get started??
You can use pyboard.py (found in micropython/tools) to upload a file into memory and execute it. Something like: pyboard.py -d /dev/ttyACM0 name-of--python-file Note which the RPi Pico and rshell you shouldn't need to specify the port. It should find it automatically. After launching rshell you can ...