
What would it take to make multiplayer games for PewPew Standalone or M4 using some cheap Bluetooth Low Energy (BLE) module, such as HM-10 or CC-2540? Should I just solder one of them to the I/O pins on the bottom? Does CircuitPython BLE module (https://circuitpython.readthedocs.io/projects/ble/en/latest/) support it? Thanks a lot!

On Mon, 27 Apr 2020 16:40:51 -0000 "niu tech" <jerzyglowacki@gmail.com> wrote:
You can connect pretty much anything to those pins that you would connect to an Adafruit Feather or similar board, so yes, those Bluetooth modules will work. However, the BLE library you linked to is for use with the native BLE interface of the NRF51-based CircuitPython boards, and not for the external modules that you listed. You would need to find or write your own library to talk to those modules, which is a considerable amount of work. So yes, it is in principle possible, but requires effort. If you would rather use WiFi, you can connect an ESP32 module running the Nina firmware, and use that, as described at https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp82... Regards, -- Radomir Dopieralski

Radomir Dopieralski wrote:
If you would rather use WiFi, you can connect an ESP32 module running the Nina firmware, and use that
Or use an ESP8266- or ESP32-based PewPew to begin with, such as a PewPew Lite on a respective Feather or a PicoPew on a TinyPICO. You'd have to use MicroPython rather than CircuitPython, but if you're only using the pew API there's little difference. If it doesn't have to be peer-to-peer, MQTT is an easy to use network protocol for multiplayer games in my experience. -Christian

Thank you! WiFi seems to be an overkill for such basic communication, but there is a very cheap NRF24L01+ radio module, which is compatible with CircuitPython (https://github.com/2bndy5/CircuitPython_nRF24L01).

On Mon, 27 Apr 2020 16:40:51 -0000 "niu tech" <jerzyglowacki@gmail.com> wrote:
You can connect pretty much anything to those pins that you would connect to an Adafruit Feather or similar board, so yes, those Bluetooth modules will work. However, the BLE library you linked to is for use with the native BLE interface of the NRF51-based CircuitPython boards, and not for the external modules that you listed. You would need to find or write your own library to talk to those modules, which is a considerable amount of work. So yes, it is in principle possible, but requires effort. If you would rather use WiFi, you can connect an ESP32 module running the Nina firmware, and use that, as described at https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp82... Regards, -- Radomir Dopieralski

Radomir Dopieralski wrote:
If you would rather use WiFi, you can connect an ESP32 module running the Nina firmware, and use that
Or use an ESP8266- or ESP32-based PewPew to begin with, such as a PewPew Lite on a respective Feather or a PicoPew on a TinyPICO. You'd have to use MicroPython rather than CircuitPython, but if you're only using the pew API there's little difference. If it doesn't have to be peer-to-peer, MQTT is an easy to use network protocol for multiplayer games in my experience. -Christian

Thank you! WiFi seems to be an overkill for such basic communication, but there is a very cheap NRF24L01+ radio module, which is compatible with CircuitPython (https://github.com/2bndy5/CircuitPython_nRF24L01).
participants (3)
-
Christian Walther
-
niu tech
-
Radomir Dopieralski