Search found 5140 matches

by pythoncoder
Mon Apr 26, 2021 6:32 am
Forum: Drivers for External Components
Topic: Receive and transmit IR remote codes
Replies: 23
Views: 5158

Re: Receive and transmit IR remote codes

I don't use Thonny so it's hard to be sure but I think it's a directory problem. When you issue

Code: Select all

from ir_rx.test import test
the assumption is that your current directory is above the ir_rx directory - i.e. your current directory contains ir_rx.
by pythoncoder
Sun Apr 25, 2021 5:49 pm
Forum: MicroPython pyboard
Topic: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?
Replies: 6
Views: 415

Re: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?

This is one of a small set of special cases where you need to think about object lifetimes. It is basically a concurrency issue where a background task is accessing a resource which the foreground task has allowed to go out of scope.
by pythoncoder
Sun Apr 25, 2021 6:21 am
Forum: MicroPython pyboard
Topic: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?
Replies: 6
Views: 415

Re: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?

Elements of an array are stored in contiguous locations. Incidentally MicroPython memory mnagement does not use reference counting - see the docs . It's best to step outside the complexities of memory management and consider basic Python scoping rules. If I write def foo(): arr = array.array('I', ra...
by pythoncoder
Sat Apr 24, 2021 6:01 pm
Forum: MicroPython pyboard
Topic: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?
Replies: 6
Views: 415

Re: Does the PyBoard DAC.write_timed() point to user memory without bumping the refcount?

This could be an issue of variable scope. If the buffer is a local variable which has gone out of scope, this is what will happen as the buffer would have existed on the stack.
by pythoncoder
Sat Apr 24, 2021 6:21 am
Forum: MicroPython pyboard
Topic: Please could some Pyboard 1.x users try this
Replies: 4
Views: 434

A word of warning

One thing to note is that my two Kingston cards both had corrupted filesystems (despite apparently working fine). The test still failed even after deleting the partition and re-formatting. But it does suggest a problem with Kingston cards - my Sandisk ones don't exhibit this.
by pythoncoder
Fri Apr 23, 2021 5:58 am
Forum: Raspberry Pi microcontroller boards
Topic: mandelbrot calculation and strange behavior in PICO
Replies: 8
Views: 758

Re: mandelbrot calculation and strange behavior in PICO

The USB problems I experienced have been fixed in V1.15. Have you updated?
by pythoncoder
Fri Apr 23, 2021 5:55 am
Forum: General Discussion and Questions
Topic: Fade 1 image to show another.
Replies: 15
Views: 1481

Re: Fade 1 image to show another.

I love that watch display with all its detail - even shadows under the hands. I know just how much work it takes to produce a display as pretty as that.
by pythoncoder
Fri Apr 23, 2021 5:47 am
Forum: MicroPython pyboard
Topic: Please could some Pyboard 1.x users try this
Replies: 4
Views: 434

Re: Please could some Pyboard 1.x users try this

Thank you, Dave, that confirms my observations (my cards are at least a year old). Given that your new card works, maybe Kingston have fixed a problem.
by pythoncoder
Thu Apr 22, 2021 5:17 pm
Forum: MicroPython pyboard
Topic: Please could some Pyboard 1.x users try this
Replies: 4
Views: 434

Please could some Pyboard 1.x users try this

This is in support of PR6007 . I experienced problems with Kingston SD cards where the SPI bus is shared with other peripherals. The fault is fixed by a simple change to sdcard.py. The question is whether I have some specially dodgy SD cards or whether others are affected. In my testing Sandisk card...