Wireless Networking Project
-
The file to push to ESP32 is located at: wireless-networking-project/bt/ESP32BluetoothReceivingData/ESP32BluetoothReceivingData.ino
-
The file to be running on a Windows 11 + is located at: wireless-networking-project/bt/wav_bt.py. You need python 3 and bluetooth library, follow these steps to make sure you have the correct python libraries:
-
Download and run "Visual Studio Installer": https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
-
Install "Visual Studio Build Tools 2017", check "Visual C++ build tools" and "Universal Windows Platform build tools"
-
git clone https://github.com/pybluez/pybluez
-
cd pybluez
-
python setup.py install
you may need to add --user flag at the end for this to work -
once all libraries are installed correctly, then run the python file like this:
-
on Windows connect to ESP32 bluetooth by name, which should be: "ESP32test" then run the below python script (python <full_path_for_wav_bt.py> <full_path_for_sounds_folder>):
-
python C:\Users\lehid\OneDrive\Documents\repos\wireless-networking-project\bt\wav_bt.py C:\Users\lehid\OneDrive\Documents\repos\wireless-networking-project\sounds\
-
now there should be a complete bluetooth interaction between ESP32 and Windows python script, where ESP32 buttons sends commands like "p,n,q" and the python script sends wav files data on an infinite loop:
ESP32: pin playPause = 22; Python: 'p'
ESP32: pin next = 23; Python: 'n'
ESP32: pin prev = 21; Python: 'q'
PS: Schematic and discussion how this project came to be is found in the BluetoothProjectReport.pdf / FinalProjectSlides.pdf / breadboardSchematic.png file or look at schematic folder which contain the schematic and software to see it.
PS2: add more wav clip sounds from here: https://www.wavsource.com/movies/movies1.htm I have found that it works well with this project.