Search found 5 matches

by lclev
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: 529

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...
by lclev
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: 529

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...
by lclev
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: 1495

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
by 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: 1495

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...
by lclev
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: 1495

~$ 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...