-1

I'm about to take a project that communicates with a BT device, receiving continuous physiological data (skin resistance) on a Windows PC. The program I create will show a real-time graph of the data, and log it. I program in Python and Visual Basic, and in order to optimize my investment in this project I'm hoping to get a suggestion for the best approach - preferably, I'll not have to learn a new programming language. This app will be used by users with no technical skills, so I need it to be plug&play.

Is it worth it to combine Python and VB? For instance creating the interface in VB, but using Python for the data processing and graphing (i.e., saving figures as files and updating in the main window)?

Thanks

OnY
  • 897
  • 6
  • 12

2 Answers2

2

I suspect the trickiest piece to find answers to will be the Bluetooth piece. How tricky that is will depend a little bit on what device you are communicating with and what level of security it has on it.

On the Python side, In Python 3.9 there is support for Bluetooth Classic RFCOMM/SPP in the standard sockets library. Example of how to do that can be found at: https://blog.kevindoran.co/bluetooth-programming-with-python-3/

If you Bluetooth device is Bluetooth Low Energy (BLE) then the Bleak library may be helpful

For packaging your application up for end users, then there looks to be good information in the following question: https://stackoverflow.com/a/2937/7721752

ukBaz
  • 6,985
  • 2
  • 8
  • 31
  • Thanks! The protocol looks pretty simple, but I have no previous experience so I might be wrong here. Here it is: https://github.com/zh2x/BCI_Protocol/blob/master/BCI%20Protocol%20V1.2.pdf – OnY Feb 28 '21 at 12:32
  • 1
    The device appears to be Bluetooth Classic so apart form needing Python 3.9 it should be fairly straight forward. – ukBaz Feb 28 '21 at 12:45
1

I'd just stick with Python for the whole project. Python's UI libraries are good enough for a project like this, and all the Python data science resources should come in handy for graphing, analysis, and logging.

Cyrus
  • 613
  • 1
  • 6
  • 22
  • Thanks. Correct me if I'm wrong, there is no way to "compile" a Python script to make it plug & play for other users? – OnY Feb 28 '21 at 07:14
  • 1
    You can compile Python to a .pyc file, and you can package a Python project: https://packaging.python.org/tutorials/packaging-projects/ – Cyrus Feb 28 '21 at 07:20
  • That's good to know! Thanks – OnY Feb 28 '21 at 14:34