Search found 17 matches

by mathieu
Mon Feb 11, 2019 5:26 pm
Forum: The MicroPython pyboard
Topic: Changing DAC.write_timed() frequency on the fly
Replies: 1
Views: 53

Re: Changing DAC.write_timed() frequency on the fly

Answering my own question based on a very quick test using a blinking LED connected to the DAC pin... Yes, it seems to work (for the blinking LED at least) by calling Timer(6).freq(f) , where f is the desired frequency. This is (to me at least) unexpected and delightful in its simplicity. I've been ...
by mathieu
Mon Feb 11, 2019 3:39 pm
Forum: The MicroPython pyboard
Topic: Changing DAC.write_timed() frequency on the fly
Replies: 1
Views: 53

Changing DAC.write_timed() frequency on the fly

After initiating a DMA transfer from a buffer to a DAC using DAC.write_timed() in DAC.CIRCULAR mode, is there any way to change the frequency at which the buffer is written to the DAC without a new call to DAC.write_timed()? For instance by acting on Timer(6)? My goal would be to imitate some kind o...
by mathieu
Fri Feb 08, 2019 9:51 pm
Forum: The MicroPython pyboard
Topic: Questions and wish list about Pyboard D
Replies: 20
Views: 736

Re: Questions and wish list about Pyboard D

Questions: Is there a reasonable chance that the pyboard D would have out-of-the-box support for I2S? Or, conversely, is there any reason to think this is unlikely? Further: am I wrong in believing the micropython implementations of I2S only run on ESP32 boards? If that's correct, is there a technic...
by mathieu
Sun May 27, 2018 12:26 pm
Forum: The MicroPython pyboard
Topic: SPI(2) interfering with DAC(2)
Replies: 1
Views: 355

SPI(2) interfering with DAC(2)

I'm using the following: DAC.write_timed(buffer, 16000, mode=DAC.CIRCULAR) on pin X6 to generate an audio signal. SPI-MOSI on pin Y8 to drive a NeoPixel strip with JanBednarik's ws2812 library For some reason, my DAC becomes silent shortly after I call WS2812.send_buf(). I've checked that the DAC bu...
by mathieu
Thu May 24, 2018 10:07 am
Forum: ESP32 boards
Topic: DAC.write_timed() support?
Replies: 1
Views: 296

DAC.write_timed() support?

Hello,

Is DAC.write_timed() supported on ESP32 (more specifically, on the Sparkfun ESP32 Thing)?

I looked for information in the Github source for MicroPython, but didn't find anything.

Thanks,

- Mathieu
by mathieu
Wed May 23, 2018 2:28 pm
Forum: Hardware Projects
Topic: Driver for WS2812 RGB LEDs (NeoPixels, ...)
Replies: 27
Views: 14197

Re: Driver for WS2812 RGB LEDs (NeoPixels, ...)

Great! But as I understand from your post on the other thread, the call to send() is still blocking during transfert, so CPU is not availabe for other tasks. Am I right? Right. First step was to get DMA working, and main reason for that was to get uninterrupted transfers with interrupts enabled. Pr...
by mathieu
Fri May 18, 2018 9:32 am
Forum: The MicroPython pyboard
Topic: Fast method for writing to a Neopixel strip
Replies: 2
Views: 409

Re: Fast method for writing to a Neopixel strip

Thanks, I'll try that and report here.
by mathieu
Wed May 16, 2018 1:14 pm
Forum: The MicroPython pyboard
Topic: Fast method for writing to a Neopixel strip
Replies: 2
Views: 409

Fast method for writing to a Neopixel strip

Hello, I'm currently driving a strip of 72 Neopixel LEDs (WS2812) from a pyboard using JanBednarik's ws2812 library [1]. I would like to know if there are other options which would provide faster refresh rates? I've looked at aykevl's FastLED [2], but I believe that it accelerates the computation of...
by mathieu
Thu Feb 01, 2018 9:44 am
Forum: General Discussion and Questions
Topic: efficient use of ustruct.unpack?
Replies: 5
Views: 884

Re: efficient use of ustruct.unpack?

Hard to know what you've done, what you're trying to do. You say you are without much success, but then seem to go on and say that you are successfully reading values. What is it that you can't do? No code or console output provided to give us a clue what you are doing. Could you share a bit more a...
by mathieu
Wed Jan 31, 2018 11:17 pm
Forum: General Discussion and Questions
Topic: efficient use of ustruct.unpack?
Replies: 5
Views: 884

efficient use of ustruct.unpack?

Dear all, I've been trying for a while to read values from a binary file containing unsigned short integers ('H'), without much success beyond reading and appending each value in a for loop. There must be a better option... What is the most efficient way to read from such a file and output an array(...