Search found 1139 matches

by jimmo
Wed Nov 06, 2019 9:23 am
Forum: General Discussion and Questions
Topic: waiting for an interrupt flag to be set
Replies: 11
Views: 946

Re: waiting for an interrupt flag to be set

Ok thanks for the details, I will investigate!
by jimmo
Wed Nov 06, 2019 5:35 am
Forum: Pyboard D-series
Topic: BLE Broadcasts vs Scans
Replies: 5
Views: 746

Re: BLE Broadcasts vs Scans

Yes it's most likely exactly that. Try:

Code: Select all

ble.gap_scan(duration_ms, 30000, 30000)
which is the fastest allowable scan. The default is that it spends a lot of time sleeping in order to save power. See https://github.com/micropython/micropython/pull/5190 for more info.
by jimmo
Wed Nov 06, 2019 3:52 am
Forum: Pyboard D-series
Topic: BLE Broadcasts vs Scans
Replies: 5
Views: 746

Re: BLE Broadcasts vs Scans

A beacon is an advertiser that includes some application-specific data in its advertising payload. (Normally, devices would use this payload to indicate which services they support, appearance, name, etc). A scanner sees the advertising payload and extracts the beacon data. This process is entirely ...
by jimmo
Tue Nov 05, 2019 9:08 am
Forum: General Discussion and Questions
Topic: waiting for an interrupt flag to be set
Replies: 11
Views: 946

Re: waiting for an interrupt flag to be set

What I am trying to achieve is an async connect ! Technically that's a synchronous connect, but yes, definitely useful! I would like to make a properly asyncio-based wrapper around the low-level API, so you can have the best of both worlds. Anyway, what you're doing is fine -- modifying a value fro...
by jimmo
Tue Nov 05, 2019 7:56 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4673

Re: ulab, or what you will - numpy on bare metal

I should add, on SF6 the external qspiflash is currently unused for storing code as the main firmware fits entirely in internal flash.
by jimmo
Tue Nov 05, 2019 7:54 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4673

Re: ulab, or what you will - numpy on bare metal

Is the 2 MB extra for the file system only? How much leeway has one for SF6? The firmware for the sf2 and sf3 is spread across the internal flash and the external qspiflash. By default everything goes to internal, except for things explicitly mentioned in the linker script (e.g. nimble and mbedtls)...
by jimmo
Tue Nov 05, 2019 4:09 am
Forum: General Discussion and Questions
Topic: waiting for an interrupt flag to be set
Replies: 11
Views: 946

Re: waiting for an interrupt flag to be set

Can you share more example code?

What sort of interrupt? e.g. hard (stm32 pin), soft (esp32 pin, BLE, etc)?
by jimmo
Tue Nov 05, 2019 1:57 am
Forum: General Discussion and Questions
Topic: emulating joystick USB-HID
Replies: 2
Views: 481

Re: emulating joystick USB-HID

Hi, I think you will need to make some changes to the firmware to support this. At first glance, I think what's needed is: Add a hid_joystick to the pyb module (alongside hid_mouse and hid_keyboard) which can be passed to pyb.usb_mode(...hid=pyb.hid_joystick). This is defined in stm32/usb.c and adde...
by jimmo
Tue Nov 05, 2019 1:22 am
Forum: ESP32 boards
Topic: ESP32 Long Range Mode 1 km
Replies: 27
Views: 1978

Re: ESP32 Long Range Mode 1 km

I'll try using the C code from this example, but it doesn't appear to be doing anything more than I am already... The main difference to that code is that it's calling `esp_wifi_set_protocol` after `esp_wifi_set_mode`, whereas in your example, `esp_wifi_set_mode` won't be called unless `wlan.active...
by jimmo
Mon Nov 04, 2019 11:19 pm
Forum: Pyboard D-series
Topic: Reading Multiple Bluetooth Beacons
Replies: 3
Views: 745

Re: Reading Multiple Bluetooth Beacons

After calling p.irq(), check if the event is "disconnected" and del from the connected dict.