Search found 3452 matches

by dhylands
Tue Jul 21, 2020 10:23 pm
Forum: Pyboard D-series
Topic: Input capture of PWM signal 40KHz
Replies: 5
Views: 359

Re: Input capture of PWM signal 40KHz

On the original pyboard, I don't think its fast enough to capture 40kHz using straight python. That's only 25 usec per cycle. If the F7 is running at a faster MHz, and you use viper or asm mode, then you might be able to do it, but I doubt you can do anything useful on a continuous basis (i.e. captu...
by dhylands
Tue Jul 21, 2020 10:19 pm
Forum: Pyboard D-series
Topic: Input capture of PWM signal 40KHz
Replies: 5
Views: 359

Re: Input capture of PWM signal 40KHz

I have an example that runs on the original pyboard: https://github.com/dhylands/upy-examples/blob/master/ic_test.py It should work on the STM32F7. I was only testing a 50 Hz signal at the time. This was part of an example that is documented more over here: http://wiki.micropython.org/platforms/boar...
by dhylands
Tue Jul 21, 2020 8:19 pm
Forum: Pyboard D-series
Topic: First experiences (firmware upgrade & hardware design issue/mitigation)
Replies: 7
Views: 843

Re: First experiences (firmware upgrade & hardware design issue/mitigation)

Yeah - WSL only supports usb serial. You can't use any of the DFU programming. You'll need to do that using regular windows utilities.

So what I do is to put my source tree some place windows has access to it. When I use my windows laptop I build using WSL and program using regular windows.
by dhylands
Mon Jul 20, 2020 6:51 pm
Forum: General Discussion and Questions
Topic: FTP reset says paramaters needed?
Replies: 1
Views: 141

Re: FTP reset says paramaters needed?

Looking at this documentation for network.Server on the WiPy: https://docs.pycom.io/firmwareapi/pycom/network/server/ Calling network.Server() returns a server instance and the other methods (including deinit) are expected to be called on the instance that was created. So you'd need to do something ...
by dhylands
Sat Jul 18, 2020 10:24 pm
Forum: Programs, Libraries and Tools
Topic: NotImplementedError. Loop for bytearray.
Replies: 3
Views: 246

Re: NotImplementedError. Loop for bytearray.

It looks like using 'in' with a bytearray isn't supported.

If you replace it with:

Code: Select all

reserved = b"\x7E\x7D\x11\x13"
then it seems to work properly.
by dhylands
Sat Jul 18, 2020 10:14 pm
Forum: General Discussion and Questions
Topic: Strange behaviour class variables [SOLVED]
Replies: 9
Views: 494

Re: Strange behaviour class variables [SOLVED]

If you want to increment the class variable then you can use a class reference.

i.e. use Foo.x += 1 rather than self.x += 1
by dhylands
Fri Jul 17, 2020 10:21 pm
Forum: MicroPython pyboard
Topic: /sd gone round 2
Replies: 3
Views: 261

Re: /sd gone round 2

How big is the SD card?

Make sure that the SD card if formatted as FAT.

I just tried a 32Gb card and it worked fine.

Make sure you power on the pyboard AFTER inserting the sdcard.
by dhylands
Fri Jul 17, 2020 3:08 pm
Forum: MicroPython pyboard
Topic: [SOLVED] can't connect to REPL
Replies: 14
Views: 532

Re: can't connect to REPL

Note that you need to logoff and log back in again (or reboot) after changing groups.

You can use the id command to confirm your group membership.
by dhylands
Fri Jul 17, 2020 2:56 pm
Forum: General Discussion and Questions
Topic: Using sockets but keep getting syntax error.
Replies: 4
Views: 255

Re: Using sockets but keep getting syntax error.

You need to surround the argument to http_get in quotes.
by dhylands
Tue Jul 14, 2020 4:46 pm
Forum: General Discussion and Questions
Topic: Is it possible to run micropython scripts loaded from hTTP?
Replies: 1
Views: 169

Re: Is it possible to run micropython scripts loaded from hTTP?

It should definitely be possible to do. Basically, it mostly boils down to how much memory you have. But you can use exec to execute a string containing python source code.

Code: Select all

>>> exec('for i in range(5):\n  print("i =", i)\n')
i = 0
i = 1
i = 2
i = 3
i = 4
>>>