Search found 3121 matches

by pythoncoder
Tue Dec 11, 2018 5:42 am
Forum: Programs, Libraries and Tools
Topic: Micropython-Fourier as upip package? / Upip in general
Replies: 3
Views: 77

Re: Micropython-Fourier as upip package? / Upip in general

No. You could use one of the Python routines in algorithms.py in my repo, but even the "fast" non-recursive one will be ~100 times slower than one written in assembler.
by pythoncoder
Tue Dec 11, 2018 5:30 am
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 22
Views: 592

Re: optimizing uasyncio performance

@Mike Teachman Your two design constraints refer to the maximum (T1) and average (T2) time in which "other coros yield to the I2S task". Each task actually yields to the scheduler. So when the I2S task yields, every other task will get a chance to run. So T1 is the sum of the maximum time between yi...
by pythoncoder
Mon Dec 10, 2018 8:03 am
Forum: General Discussion and Questions
Topic: Threading or RTOS in uPython
Replies: 4
Views: 113

Re: Threading or RTOS in uPython

gwork wrote:
Sun Dec 09, 2018 2:05 pm
Thanks for the suggestion. What is the difference between uasyncio and threading? Is uasyncio non-preemptive? If that's the case, it will probably work fine for my usage.
See this doc and this one.
by pythoncoder
Mon Dec 10, 2018 7:57 am
Forum: Programs, Libraries and Tools
Topic: Micropython-Fourier as upip package? / Upip in general
Replies: 3
Views: 77

Re: Micropython-Fourier as upip package? / Upip in general

It is not on PyPi. Nor will it run on the ESP32 as it is written in ARM assembler. The library is strictly for STM devices such as the Pyboard. I'm not aware of an index for PyPi but packages on there are generally prefixed micropython . Many user-contributed drivers are not on PyPi. The best way to...
by pythoncoder
Mon Dec 10, 2018 7:48 am
Forum: The MicroPython pyboard
Topic: Pyboard Node for I2S and I2C
Replies: 2
Views: 57

Re: Pyboard Node for I2S and I2C

Currently I2S on the Pyboard is unsupported.
by pythoncoder
Sun Dec 09, 2018 7:47 pm
Forum: ESP8266 boards
Topic: Designing resilient IOT applications
Replies: 1
Views: 62

Designing resilient IOT applications

The work I've done on enabling ESP8266 devices to work for long periods has convinced me of the following: Assuming good quality hardware it is possible to write applications that never crash or produce error messages. Such applications can survive WiFi outages without loss of program state. Brief W...
by pythoncoder
Sun Dec 09, 2018 6:57 am
Forum: General Discussion and Questions
Topic: Threading or RTOS in uPython
Replies: 4
Views: 113

Re: Threading or RTOS in uPython

I recommend uasyncio unless you really need threading. Reasons why, and a general tutorial on its installation and use, may be found in this repository.
by pythoncoder
Sat Dec 08, 2018 4:51 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 22
Views: 592

Re: optimizing uasyncio performance

Interesting that sleep_ms() is consistently slower than sleep() despite the latter's use of floating point. I stand corrected on that ;) I have doubts about uasyncio coping with i2s. It depends on how the i2s code is implemented. uasyncio can handle data streams on UARTs because the UART interface u...
by pythoncoder
Fri Dec 07, 2018 6:45 am
Forum: ESP8266 boards
Topic: Piezo Sensor + Wifi + Database
Replies: 7
Views: 217

Re: Piezo Sensor + Wifi + Database

I'm not familiar with piezo vibration sensors but, as @Roberthh says, piezoelectric devices are extremely high impedance. They can also produce high voltages. To interface one to an ADC there needs to be a DC bias so that the mean level is in the middle of the ADC range. I would also want to see vol...
by pythoncoder
Wed Dec 05, 2018 5:19 pm
Forum: ESP32 boards
Topic: optimizing uasyncio performance
Replies: 22
Views: 592

Re: optimizing uasyncio performance

For a nominal zero delay it is quicker to issue asyncio.sleep_ms(0) and quicker still to issue yield . However whenever you issue one of these, every other coro will get scheduled before it returns. Note that the Barrier runs a (minimal) coro while a task is waiting on it. These delays soon add up. ...