Search found 14 matches

by monquarter
Tue Jan 12, 2021 2:44 pm
Forum: Pyboard D-series
Topic: ENOMEM error
Replies: 5
Views: 1349

Re: ENOMEM error

I made a build as suggested by jimmo with debug flag enabled, and modified the ble_temperature to send data more quickly to a second pyboard-DSF6 running ble_central.py example. See https://forum.micropython.org/viewtopic.php?f=20&t=8844 for more info on the test setup. nimble: characteristic_access...
by monquarter
Mon Jan 11, 2021 5:20 pm
Forum: Pyboard D-series
Topic: Unable to write numpy arrays to '.txt' or '.DAP' files on SD
Replies: 5
Views: 814

Re: Unable to write numpy arrays to '.txt' or '.DAP' files on SD

As a workaround you can use the .flatten().tobytes() methods. a = np.zeros((1,1)) b = a.flatten().tobytes() This won't give you an error, however it doesn't function properly. I think there may be a bug in the .tobytes() file as the lenght of the array is off by a factor of 8 (the size of float obje...
by monquarter
Mon Jan 11, 2021 4:50 pm
Forum: Pyboard D-series
Topic: ENOMEM error
Replies: 5
Views: 1349

Re: ENOMEM error

Additionally, I notice that it is not possible to configure that rxbuf parameter associated with the ble. >>> MPY: sync filesystems MPY: soft reboot MicroPython v1.13-268-gf7aafc062 on 2021-01-11; PYBD-SF6W with STM32F767IIK Type "help()" for more information. >>> import ubluetooth >>> ble = ublueto...
by monquarter
Fri Dec 18, 2020 8:42 pm
Forum: Pyboard D-series
Topic: Question about sleep_us vs sleep_ms in timer
Replies: 2
Views: 439

Re: Question about sleep_us vs sleep_ms in timer

Thanks for the reply. That certainly makes sense. Another oddity I see is when running this code: import pyb import utime dum1 = utime.ticks_us() dum2 = 0 dum3 = 0 dum4 = 300 dum5 = 0 a = 0.5 def tick_motor(timer): global dum1,dum2,dum3,dum4,dum4 dum2 = utime.ticks_us() print(dum2-dum1) while dum3<d...
by monquarter
Fri Dec 18, 2020 3:06 pm
Forum: Pyboard D-series
Topic: Question about sleep_us vs sleep_ms in timer
Replies: 2
Views: 439

Question about sleep_us vs sleep_ms in timer

I have a question regarding the difference in utime.sleep_ms() compared to utime.sleep_us(). I am using a Pyboard D-Series SF6 with Micropython V 1.13. First off, I know that I should not generally be calling utime.sleep inside of a timer callback. I am doing this as a unit test as part of a larger ...
by monquarter
Sun Dec 13, 2020 12:25 am
Forum: ESP32 boards
Topic: File write speed
Replies: 13
Views: 4571

Re: File write speed

I have a similar issue where I am trying to log sensor acquired data quickly, and tried the solution proposed above: import uasyncio as asyncio async def sender(): with open('test.txt', 'w') as f: swriter = asyncio.StreamWriter(f, {}) while True: await swriter.awrite('Hello file\n') await asyncio.sl...
by monquarter
Wed Aug 05, 2020 6:17 pm
Forum: Pyboard D-series
Topic: BLE [Errno 12] ENOMEM
Replies: 1
Views: 1520

BLE [Errno 12] ENOMEM

I have been working with the ble_temperature and ble_temperature_central examples (https://github.com/micropython/micropython/tree/master/examples/bluetooth). I have 2 PYBD-SF6W running MicroPython v1.12-652-gcaaaa2b1f , running a file on each one of them. I am running the ble_temperature_central.py...
by monquarter
Tue Jan 14, 2020 1:50 am
Forum: Pyboard D-series
Topic: BLE.config('rxbuf') not implemented?
Replies: 11
Views: 2785

Re: BLE.config('rxbuf') not implemented?

I recopied your demo files and added the code you suggested and I saw the same output as you. After reviewing, I noticed that I had changed the sleep_ms to sleep_us in the ble_temperature.py file when I first started working on the example to try and stress the ble link. It was throwing a memory err...
by monquarter
Sun Jan 12, 2020 4:33 am
Forum: Pyboard D-series
Topic: BLE.config('rxbuf') not implemented?
Replies: 11
Views: 2785

Re: BLE.config('rxbuf') not implemented?

Yes, that is the setup that I am working with. I am able to read fine, but when I put in a print statement to debug the events that are called in the _irq function, I never see 8192. def _irq(self, event, data): print(event) if event == _IRQ_SCAN_RESULT: addr_type, addr, connectable, rssi, adv_data ...
by monquarter
Sun Jan 12, 2020 4:16 am
Forum: Pyboard D-series
Topic: BLE.config('rxbuf') not implemented?
Replies: 11
Views: 2785

Re: BLE.config('rxbuf') not implemented?

I've been working through the ble_temperature_central.py example provided, which is very helpful. I have not been able to get the _IRQ_GATTC_NOTIFY event to be raised. When I connect on my phone, I am able to read the notifications. Are there any modifications that might be required for the pyboard-...