Search found 67 matches

by kwiley
Mon Oct 29, 2018 3:49 am
Forum: MicroPython pyboard
Topic: SCCB comms via I2C?
Replies: 3
Views: 505

Re: SCCB comms via I2C?

Guess I'll have to decide if I want to try it. The cameras cost nothing, so there's no harm in it, other than the risk of wasted time.

Thanks.
by kwiley
Sun Oct 28, 2018 5:49 pm
Forum: MicroPython pyboard
Topic: Combining two bytes to one 16-bit object
Replies: 5
Views: 1737

Re: Combining two bytes to one 16-bit object

Aside from the response you already got, it's worth noting that it might be faster to manipulate bits and bytes with bit operators instead of arithmetic operators. So instead of adding the low byte trying ORing it instead: word = (high_byte << 8) | low_byte Of course, you would have to write a timer...
by kwiley
Sun Oct 28, 2018 11:11 am
Forum: MicroPython pyboard
Topic: SCCB comms via I2C?
Replies: 3
Views: 505

SCCB comms via I2C?

There is some discussion about cameras going on in other threads. I noticed that some of the cameras available use an SCCB bus, which appears to be very similar to I2C. Has anyone actually used an SCCB device with a PyBoard yet?
by kwiley
Sat Oct 27, 2018 1:13 pm
Forum: MicroPython pyboard
Topic: Camera integration
Replies: 13
Views: 7155

Re: Camera integration

Does the PyBoard's UART interface support the Adafruit's camera's baudrate (38400 to 115200)? The docs for MicroPython aren't very clear on which baudrates are permitted to the UART initialization routines (https://docs.micropython.org/en/latest/library/machine.UART.html). All the code examples show...
by kwiley
Wed Jun 20, 2018 3:51 pm
Forum: MicroPython pyboard
Topic: USB virtual com RTS/CTS?
Replies: 10
Views: 1203

Re: USB virtual com RTS/CTS?

Thanks for these later responses. There are some good ideas here. I'm balancing the various pros and cons of all the ways to get this running smoothly. I'd hate to have to reinvent, at a high level, protocols that are generally presumed on offer by lower layers after decades of standardization and c...
by kwiley
Tue Jun 19, 2018 7:25 pm
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 2818

Re: Memory allocation errors with plenty of space

Hmmm. Ok. On a PyBoard v1.1, running MP v1.9.4., I'm seeing the behavior described above. Thanks.
by kwiley
Tue Jun 19, 2018 5:53 pm
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 2818

Re: Memory allocation errors with plenty of space

That memorview tool looks very useful. However, I am not seeing the expected behavior. Consider the following: mp.mem_info(1) a = bytearray(10000) mp.mem_info(1) b = a[:] mp.mem_info(1) c = memoryview(a) mp.mem_info(1) After allocating a , I see a large jump in used memory. After allocating b , I al...
by kwiley
Tue Jun 19, 2018 4:19 pm
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 2818

Re: Memory allocation errors with plenty of space

Thanks everyone. I'll take a closer look at that. One place that it is hard to avoid reallocating memory is in the rolling buffer coming in from a serial line. I can preallocate the receive buffer so as to use usb.readinto() instead of usb.read(), but I still have to chomp my way through the accumul...
by kwiley
Mon Jun 18, 2018 10:09 pm
Forum: General Discussion and Questions
Topic: Memory allocation errors with plenty of space
Replies: 16
Views: 2818

Memory allocation errors with plenty of space

I often get memory allocation exceptions when there is quite a bit of free memory and the requested amount is substantially smaller than the current supply. For example, I might see something like this: Free memory: 49616 MemoryError: memory allocation failed, allocating 4084 bytes I know I can fidd...
by kwiley
Mon Jun 18, 2018 3:52 pm
Forum: General Discussion and Questions
Topic: uzlib error
Replies: 3
Views: 495

Re: uzlib error

Well, I'm working on a Mac, using PySerial from Jupyter. I'll look into the possibility of character transformation some.