Search found 5303 matches

by pythoncoder
Thu Aug 05, 2021 5:15 am
Forum: MicroPython pyboard
Topic: Running boot script on flash then attaching SD card
Replies: 2
Views: 54

Re: Running boot script on flash then attaching SD card

I don't know the answer re the built-in SD card, but I solved this problem by fitting a separate SD card using the official driver . Power to the SD card is switched by a MOSFET, and the Pyboard has no SD card fitted. So I power up the external SD card, initialise it, write to it, close the file and...
by pythoncoder
Thu Aug 05, 2021 5:09 am
Forum: Development of MicroPython
Topic: Length of identifier names and RAM usage
Replies: 2
Views: 41

Length of identifier names and RAM usage

This is perhaps academic but from reading the docs and watching one of Damien's presentations I had formed the idea that a worthwhile optimisation was to use short names (and to re-use them). The docs indicate that names no longer than 10 characters get interned as qstrs. So I did this test. I recen...
by pythoncoder
Thu Aug 05, 2021 4:49 am
Forum: Development of MicroPython
Topic: Support for __rlt__, __rle__, ...
Replies: 7
Views: 126

Re: Support for __rlt__, __rle__, ...

I see the same result on the Unix build and on a Pyboard. I'm no expert on the build system but all seem to be defined with MICROPY_PY_REVERSE_SPECIAL_METHODS set. [adminpete@capybara]: /mnt/qnap2/data/Projects/MicroPython/micropython/ports $ grep --include=\*.h -rnw '.' -e "MICROPY_PY_REVERSE_SPECI...
by pythoncoder
Wed Aug 04, 2021 5:33 am
Forum: Programs, Libraries and Tools
Topic: GPS click on micropython
Replies: 13
Views: 375

Re: GPS click on micropython

On the contrary, as far as I can see the program is telling you it is receiving nothing.

Did you test the UART as I suggested? Is that baudrate correct: my GPS uses 9600 unless I send it a special command to change it.
by pythoncoder
Tue Aug 03, 2021 4:35 am
Forum: Raspberry Pi microcontroller boards
Topic: Low frequency Signal generator for CTCSS
Replies: 11
Views: 368

Re: Low frequency Signal generator for CTCSS

Looks reasonable to me!
by pythoncoder
Mon Aug 02, 2021 4:26 pm
Forum: Raspberry Pi microcontroller boards
Topic: Low frequency Signal generator for CTCSS
Replies: 11
Views: 368

Re: Low frequency Signal generator for CTCSS

If you have multiple timers running then I think jitter is inevitable. The poor old CPU can only do one thing at once ;) I never use timers to read switches or to control displays: uasyncio is your friend here. See the official docs and my tutorial - this repo has code for debouncing switches and pu...
by pythoncoder
Mon Aug 02, 2021 8:39 am
Forum: Raspberry Pi microcontroller boards
Topic: Low frequency Signal generator for CTCSS
Replies: 11
Views: 368

Re: Low frequency Signal generator for CTCSS

On reflection this may be a ready made solution. It uses the PIO to output arbitrary pulse trains. Each pulse width is specified by a number of μs, that number can be 16 or 32 bits. Pulse widths are stored in an array of any length and can be output continuously. So you could output a fixed, precise...
by pythoncoder
Mon Aug 02, 2021 8:03 am
Forum: Programs, Libraries and Tools
Topic: LED blinking and DHT22 Sensor Codes
Replies: 20
Views: 308

Re: LED blinking and DHT22 Sensor Codes

It's all standard Python. A key design aim of Damien's rewrite of uasyncio is compatibility with Python 3. Asynchronous coding requires learning some additional Python syntax and understanding the concepts of coroutines and tasks. I wrote the tutorial because I found most of the information on the i...
by pythoncoder
Mon Aug 02, 2021 7:55 am
Forum: Raspberry Pi microcontroller boards
Topic: Low frequency Signal generator for CTCSS
Replies: 11
Views: 368

Re: Low frequency Signal generator for CTCSS

The frequency of the PWM has nothing to do with the one of the signal you want to synthesize. Apart than the frequency of the PWM shall be way higher than the one you synthesize... It's common to use PWM to generate a fixed frequency square wave. The solution you propose would involve changing the ...
by pythoncoder
Mon Aug 02, 2021 7:45 am
Forum: General Discussion and Questions
Topic: [RSHELL on nucleo L476rg ] Unable to copy py files to flash
Replies: 7
Views: 601

Re: [RSHELL on nucleo L476rg ] Unable to copy py files to flash

OK, it seems like your filesystem is broken. I'm afraid we need a Zephyr expert now.