Using Bluetooth mouse in
to control my process I need two hardware buttons.
I thought to use the buttons of a bluetooth mouse.
Is there any experience on this field about any prefered LE Bluetooth device ?
From the "cb" Documentation:
- The cb (“Core Bluetooth”) module enables you –to connect to Bluetooth LE (“Low Energy”) peripherals like the TI SensorTag (a small and affordable BTLE device that contains various sensors like an IR thermometer, accelerometer, etc.).
- The examples in this documentation assume that you either have a standard Bluetooth LE heartrate monitor, or a TI SensorTag, but the module also works with other types of Bluetooth LE peripherals. Note that “classic” Bluetooth (used for headsets, keyboards, etc.) is NOT supported.
For IOS direct and BLE connectivity, I'm playing with boards available from Adafruit and other vendors. I'm using the Adafruit ones and find they're very easy to use, work well and have a lot of support documentation and examples. Some are actually programmable in a python dialect called Circuit Python.
I have NOT, however tried them with the cb module, but there's no reason they shouldn't work.
The easiest way to do what you are trying to do is to skip cb and use HID interfacing to create actual keyboard devices. This way your python program can use regular keyboard IO.
In fact, I've even used HID USB interfacing with Apple's Camera Connection Kit adapter to connect this type of device via USB.
The Adafruit "ItsyBitsy M0 Express" is a tiny controller that can be powered and run directly from a USB connection. A trivial python program can be used to simulate keyboard codes from contact closures with no additional parts besides the switches. I'm playing with a "page turner" that uses a foot pedal to turn document pages this way.
I'm also playing with a similar project using BLE with a fancier board called the "Feather MO Bluefruit LE". It's based on the popular Arduino development support, but there are plenty of samples and documentation for doing this kind of thing. There are many more boards available from Adafruit and others at various price points with different BLE and hardware IO and programming support.
All the BLE boards also support general purpose "BLE GAP" programming if you want to use the "cb" module to communicate, but I haven't played with that approach very much.
Just google "Adafruit".
Hope this info helps....
( I have no connection with Adafruit - I'm just a satisfied customer...)