Search found 89 matches

by dbc
Fri Sep 01, 2017 11:03 pm
Forum: Drivers for External Components
Topic: Stepper motor module
Replies: 7
Views: 10481

Re: Stepper motor module

The drawback would be a substantially lower maximum step rate, especially on the ESP826 Yes, well, say you are using a common 200 steps/rev motor, and 1/4 microstepping, and two edges per step, or 1600 edges to generate per revolution. The OP's code has a 20 uSec minimum time between edges. At 20 u...
by dbc
Fri Aug 18, 2017 4:11 pm
Forum: Programs, Libraries and Tools
Topic: RSHELL --buffer-size recommendation
Replies: 5
Views: 2527

Re: RSHELL --buffer-size recommendation

So a while back I filed this issue: https://github.com/micropython/micropython/issues/3231 which has a similar smell, although it has nothing to do with rshell. Unfortunately, I haven't had a chance to get back to chasing it but I hope to get some bench time on it this weekend when I can set up a te...
by dbc
Sat Aug 12, 2017 9:47 pm
Forum: Drivers for External Components
Topic: CAN ISR - MemoryError due to can.recv(0)
Replies: 3
Views: 1908

Re: CAN ISR - MemoryError due to can.recv(0)

Note that "softirq" functionality as mentioned in one of your linked threads became micropython.schedule(), which is parhaps another solution to this problem.
by dbc
Fri Aug 04, 2017 11:40 pm
Forum: General Discussion and Questions
Topic: Using micropython with arduino core
Replies: 4
Views: 3553

Re: Using micropython with arduino core

Have you looked at the @micropython.native and @micropython.viper decorators?
by dbc
Wed Aug 02, 2017 5:01 pm
Forum: General Discussion and Questions
Topic: Low Overhead API JSON - avoiding mystifying tokenizer
Replies: 14
Views: 5787

Re: Low Overhead API JSON - avoiding mystifying tokenizer

You might want to check out jsmn https://github.com/zserge/jsmn which tokenizes JSON by simply giving you pointers into the JSON text. It isn't incremental, but on the other hand it doesn't do any dynamic memory allocation either. I was looking at it for an embedded project and I was attracted to it...
by dbc
Mon Jul 24, 2017 5:00 pm
Forum: Drivers for External Components
Topic: CAN ISR - MemoryError due to can.recv(0)
Replies: 3
Views: 1908

Re: CAN ISR - MemoryError due to can.recv(0)

Kind of a sticky one. It would be nice if there were a version of CAN.recv() that wrote to a pre-allocated buffer. My first thought would be to use array.array() to pre-allocate a buffer, and then write the call-back as inline assembly that read from the hardware registers and wrote to the pre-alloc...
by dbc
Mon Jul 24, 2017 3:08 pm
Forum: MicroPython pyboard
Topic: Serial echo hangs? I must be crazy...
Replies: 5
Views: 2796

Re: Serial echo hangs? I must be crazy...

Use two Pyboards, one to flood the other? Yes, I have a pair I can try that with. Also, I've been able to cause the behaviour with an FTDI serial adapter cable. A pair of PyBoards would probably be a better test from the viewpoint of Micropython maintainers because that guarantees access to a known...
by dbc
Mon Jul 24, 2017 4:23 am
Forum: General Discussion and Questions
Topic: const() not behaving per documentation
Replies: 2
Views: 1508

Re: const() not behaving per documentation

Tried the test micropyton/test/micropython/const.py on my pyboard and it fails.
by dbc
Mon Jul 24, 2017 3:33 am
Forum: General Discussion and Questions
Topic: const() not behaving per documentation
Replies: 2
Views: 1508

const() not behaving per documentation

MicroPython v1.9.1 on 2017-06-11; PYBv1.1 with STM32F405RG Type "help()" for more information. >>> x = const(1) >>> y = const(1<<2) >>> z = const(x+1) Traceback (most recent call last): File "<stdin>", line 1 SyntaxError: constant must be an integer >>> z = const(int('1')) Traceback (most recent ca...
by dbc
Mon Jul 24, 2017 12:41 am
Forum: Development of MicroPython
Topic: Reusing uart.c functions for a serial device
Replies: 3
Views: 1392

Reusing uart.c functions for a serial device

I'm working on a project with a couple of serial protocols that need to run relatively fast. I'm thinking of creating C modules that implement the protocols so that the Python interface doesn't have to keep up with the character-level protocols. Can I link against uart.c to pick up the basic uart in...