Search found 80 matches

by smhodge
Tue Sep 22, 2020 3:11 am
Forum: MicroPython pyboard
Topic: CAN timeout recovery
Replies: 0
Views: 762

CAN timeout recovery

Once in a blue moon (like after 30 minutes or so of receiving a couple of packets every minute over the CAN bus) I get a "OSError: [Errno 110] ETIMEDOUT" error. The code is like this: class CanPort(CAN): def __init__(self): super().__init__(1) self.buf = bytearray(8) self.lst = [0, 0, 0, memoryview(...
by smhodge
Thu Sep 03, 2020 5:01 pm
Forum: MicroPython pyboard
Topic: boot file system and SKIPSD
Replies: 2
Views: 154

boot file system and SKIPSD

My interpretation of the documentation is that the boot file system (/flash or /sd) is where it first finds <boot.py> and <main.py>, starting the search with /sd if it exists, and that you can force /sd to be skipped and thus use /flash by either removing the SD card or putting an empty SKIPSD file ...
by smhodge
Thu Sep 03, 2020 4:42 pm
Forum: MicroPython pyboard
Topic: rshell issue
Replies: 4
Views: 213

Re: rshell issue

Got it, thanks.
by smhodge
Thu Sep 03, 2020 3:12 pm
Forum: MicroPython pyboard
Topic: rshell issue
Replies: 4
Views: 213

Re: rshell issue

Thanks, sure enough it was there, /sd/cos.log on the current Windows drive. I guess I got caught by some sort of under-the-hood way rhell works. I thought "/" as in "/sd" would be the root of the pyboard. It looks like its actually "/" = "/pyboard"; is that correct? Why don't I see "/pyboard" listed...
by smhodge
Thu Sep 03, 2020 2:05 am
Forum: MicroPython pyboard
Topic: rshell issue
Replies: 4
Views: 213

rshell issue

I have a pyboard that the SD part of it is toast, I think. Not the card itself but probably the driver or reader or something. At any rate I decided to check it out again so I did a full (not quick) format of a 16GB card and a mass erase/firmware re-install (v1.12 on a v1.1 pyboard) and then opened ...
by smhodge
Tue Sep 01, 2020 4:41 pm
Forum: General Discussion and Questions
Topic: opening existing file on /flash for appending
Replies: 5
Views: 330

Re: opening existing file on /flash for appending

I just did some more tests. I does not matter if I use close() or not, or if I use mode='a+b', 'w+b' or 'r+b'. In all cases it finds the file on /flash just fine but it opens it with a file length of 0 and thus new writes to it over-write the old contents. BUT, in all cases, the same code lines work...
by smhodge
Tue Sep 01, 2020 2:50 pm
Forum: General Discussion and Questions
Topic: opening existing file on /flash for appending
Replies: 5
Views: 330

Re: opening existing file on /flash for appending

I don't have a problem writing the data. If I let my code run after it has opened the now new file it writes new data just fine. The problem is I can't get to first base with the "open append" function: it just trashes the old existing file and starts a new one. BUT if i run the same code in the REP...
by smhodge
Tue Sep 01, 2020 2:18 am
Forum: General Discussion and Questions
Topic: opening existing file on /flash for appending
Replies: 5
Views: 330

opening existing file on /flash for appending

I am trying to open an existing file stored on /flash for appending & reading. It is a binary data file created with a prior run of my code. I can do it just fine from the REPL with the following code: --------------------------- filePath = '/flash/cos.log' file = open(filePath,'a+b') from uos impor...
by smhodge
Sat Jul 18, 2020 12:33 am
Forum: MicroPython pyboard
Topic: /sd gone round 2
Replies: 3
Views: 348

Re: /sd gone round 2

I tried 2, 16 and 32 GB cards, all formatted FAT. They all work in other pyboards.

Is it robust enough to survive inserting after the board is powered on, even though it might not work until it's done properly?
by smhodge
Fri Jul 17, 2020 3:23 pm
Forum: MicroPython pyboard
Topic: /sd gone round 2
Replies: 3
Views: 348

/sd gone round 2

Brand-new, out-of-the-box, pyboard v1.1. Connected to it with rshell to see if it was alive and well. It was except, once again, no /sd. Unlike round 1 (months ago) no code had been loaded onto it. The rshell message is the same: "cannot access /sd". I tried full erase & reloading firmware (and upgr...