Thanks to all!
Putting in quotation marks, as suggested by dhylands, worked.
Also using pyboard.py as suggested by pythoncoder worked. Sample code much appreciated.
lcleve
Search found 7 matches
- Wed Apr 07, 2021 2:04 pm
- Forum: General Discussion and Questions
- Topic: Problem with rshell running a series of commands
- Replies: 4
- Views: 2047
- Sat Apr 03, 2021 4:15 am
- Forum: General Discussion and Questions
- Topic: Problem with rshell running a series of commands
- Replies: 4
- Views: 2047
Problem with rshell running a series of commands
I am using micropython v. 1.12 and PYB v1.1. connected via usb to raspberry pi 4B with latest version of Raspberry Pi OS. I can manually enter rshell and then enter repl and then type import mm1 and get the simple program to run ok. However, if I run the following code, it does'nt work: $rshell repl...
- Sat Dec 21, 2019 2:20 pm
- Forum: MicroPython pyboard
- Topic: Problem with logging data to sd card - loss of usb connection in repl mode
- Replies: 2
- Views: 2239
Re: Problem with logging data to sd card - loss of usb connection in repl mode
If you're logging to a file, you should make sure that you put pyb.usb_mode('VCP') in your boot.py file (i.e. you need to disable MSC). If you don't then the host will corrupt your sd filesystem. Your code does an open of /sd/log/diary. Did you create the log directory on the sd card already? If no...
- Wed Dec 11, 2019 6:34 pm
- Forum: MicroPython pyboard
- Topic: Problem with logging data to sd card - loss of usb connection in repl mode
- Replies: 2
- Views: 2239
Problem with logging data to sd card - loss of usb connection in repl mode
The following code was tested using rshell and repl and was found to work when the three file statements at the end were commented out and replaced by print(datum). When b2 was pressed, the current value of i together with the date and time was printed to screen at the python prompt. This could be d...
- Thu Nov 21, 2019 5:48 pm
- Forum: MicroPython pyboard
- Topic: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
- Replies: 4
- Views: 4417
Re: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
Thanks very much. The code is now working and I am racing forwards to the next bottleneck!
Cheers,
lclev
Cheers,
lclev
- Wed Nov 20, 2019 3:09 am
- Forum: MicroPython pyboard
- Topic: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
- Replies: 4
- Views: 4417
Re: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
Thank you very much for your reply. I am still stuck with importing files from the pyboard into repl. Essentially, using os.listdir('/flash') I can see the file on the pyboard. When I try to import it, the file is not found. Here is the code from my terminal. (base) william@william-HP-Compaq-Elite-8...
- Sat Nov 16, 2019 3:22 am
- Forum: MicroPython pyboard
- Topic: ~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
- Replies: 4
- Views: 4417
~$ python pyboard.py flash1.py python: can't open file 'pyboard.py': [Errno 2] No such file or directory
I am trying to migrate from Arduino to pyboard 1.1, which I bought frm adafruit with micropython already installed. I am on Ubuntu 18,04 and am using python3.6.8, which is also new to me. I need to turn on and off two leds in a progressive sequence. This requires a simple for loop with one button to...