Search found 83 matches

by smhodge
Sat Feb 13, 2021 4:58 pm
Forum: MicroPython pyboard
Topic: "cold" plugging usb?
Replies: 0
Views: 93

"cold" plugging usb?

My pyboards (v1.1) are powered externally via V+. I know from experience it is ok to hot plug/unplug the USB connection while the board is powered on (or at least I haven't had any issues in over 100's of times). However, some time ago I had an issue that made me suspect "cold" plugging it, i.e., ha...
by smhodge
Fri Dec 11, 2020 8:19 pm
Forum: MicroPython pyboard
Topic: UART TX buffer length
Replies: 1
Views: 213

UART TX buffer length

Is it possible to set the UART TX buffer length? Is it possible to set it to 0 for an RX-only UART serial port? The following works for setting the RX buffer length: from pyb import UART uart = UART(6) uart.init(115200, rxbuf=64) # also accepts "read_buf_len" instead of "rxbuf" but adding "txbuf=64"...
by smhodge
Mon Nov 30, 2020 1:17 am
Forum: MicroPython pyboard
Topic: stdout to TTL serial using FT230X
Replies: 0
Views: 294

stdout to TTL serial using FT230X

Using dupterm I am able to redirect stdout on the USB port of the pyboard to another UART (aka serial TTL port). I've tested it using the REPL and it works just fine. However, many of my target pyboards don't have an extra UART available for such use, so I tried making a small external adapter board...
by smhodge
Tue Sep 22, 2020 3:11 am
Forum: MicroPython pyboard
Topic: CAN timeout recovery
Replies: 0
Views: 1246

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: 399

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: 524

Re: rshell issue

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

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: 524

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: 679

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: 679

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