Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Board chain: USB <> BLE <> Motor fader #940

Open
Thorsten-Behrens opened this issue Jul 14, 2023 · 3 comments
Open

Board chain: USB <> BLE <> Motor fader #940

Thorsten-Behrens opened this issue Jul 14, 2023 · 3 comments

Comments

@Thorsten-Behrens
Copy link

Dear Pieter,

what is the best platform to ask questions regarding Control Surface?

In case it's here (if not ignore):
What is the best chain to control a motorfader via ble?

If I understand correctly for native USB support one of the following boards is required:
Arduino Due, Arduino Leonardo, Arduino Micro, Arduino Nano 33 IOT, Arduino Zero, Arduino MKR Zero, Arduino MKR1000 ...

For BLE transfer two ESP32 are required, as the Arduino Nano BLE is not supported.

For Control Surface Motor Fader an Arduino UNO or Nano are equired.

So a possible chain would be:

PC side:
Arduino Micro
ESP32

Control Side:
ESP32
Arduino Nano BLE

This is four boards. Is there any option to reduce it to three or even two boards?

Thanks a lot in advance!
Thorsten

@tttapa
Copy link
Owner

tttapa commented Jul 15, 2023

For BLE transfer two ESP32 are required, as the Arduino Nano BLE is not supported.

If you control both endpoints of the BLE link, there's no such restriction, as you could use any custom protocol to send the MIDI data.
Note that Control Surface only supports BLE GATT server mode (to connect to a smartphone or PC, which is the most common use case), so it does not support connecting two ESP32s over BLE out of the box.

For Control Surface Motor Fader an Arduino UNO or Nano are equired.

Specifically, it requires an ATmega328P. This covers the original Nano, but not the inappropriately named newer Nano variants like the Nano 33 IoT/BLE or Nano Every

This is four boards. Is there any option to reduce it to three or even two boards?

Why not use a single ESP32 that connects to your computer's Bluetooth card directly?

While the Control Surface Motor Fader project was written specifically for the ATmega328P, the techniques that are used can be ported to other platforms as well, but you'll need some (low-level) programming experience to pull it off.

The reason why I wrote it for the ATmega328P is that Arduino Nano clones are really cheap, and can be added as slaves to a more powerful microcontroller. The timing of the control loops is pretty sensitive, so using separate microcontrollers for them is an easy way out, although you could in theory reserve a single core (or even a high-priority task) on the ESP32 for the control loops and not use any extra microcontrollers.

@Thorsten-Behrens
Copy link
Author

Thanks for your prompt response!

Why not use a single ESP32 that connects to your computer's Bluetooth card directly?

This definitely sounds like the best option. I'll try to figure it out (I'm new to midi and bluetooth...). Any sketches available I could build upon are greatly appreciated.

@tttapa
Copy link
Owner

tttapa commented Jul 19, 2023

No specific sketch, you can simply replace the USBMIDI_Interface instance in your code by a BluetoothMIDI_Interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants