Close
0%
0%

Windows AudioController

A device to switch audio devices in Windows

Similar projects worth following
A device to switch audio devices (e.g. headset < - > speakers) in Windows, change the volume and mute the microphone.

The AudioController is based on a Arduino (wemos D1 mini) which communicates with a Windows Powershell script via serial connection. In addition to the CH340 driver, no other drivers are necessary. No native USB is used.

All scripts and other ressources can be found in this project.

HowTo 

1. install Cmdlet on Windows PC
https://github.com/frgnca/AudioDeviceCmdlets

2. install CH340 (WemosD1 mini) driver
https://www.wemos.cc/en/latest/ch340_driver.html

3. copy "AudioController.ps1" script to your prefered path

4. get COM port for your WemosD1 mini via Powershell (or Windows Device Manager) 
Powershell: Get-WMIObject Win32_SerialPort | Select-Object DeviceID,Description
-> change SerialPort Number in "AudioController.ps1" in config section

5. start powershell script via windows scheduled job

#name
soundcontroller
----> *high privileges
----> *hidden

#trigger
at logon
----> *delay 15sec.

#actions
start program

#program/script
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

#arguments -> !!  you have to adjust  the path of the script  !!
-noexit -ExecutionPolicy Bypass -WindowStyle hidden -File C:\bastel\audio_controller\AudioController.ps1

#start in
C:\Windows\System32\WindowsPowerShell\v1.0

-----------------------------------------------

ESP PINOUT

Display:
SCL:    D1 (GREEN CABLE)
SDA:    D2 (ORANGE CABLE)

Rotary:
LFT:    D6 (GREEN CABLE)
RGT:    D5 (ORANGE CABLE)

Buttons:
MIC:    D3 (VIOLET CABLE)
SWC:    D7 (YELLOW CABLE)

LED's:    D8 (RED CABLE)

Flash Firware on Arduino

flash your Wemos D1 mini with code (available for download in this repo) with Arduino IDE

AudioController.ps1

Windows code

ps1 - 5.37 kB - 07/10/2024 at 07:58

Download

soundcontroller.xml

Windows scheduled job example for import (you have to adjust your user and the path of the script)

XML - Extensible Markup Language - 3.57 kB - 04/03/2024 at 18:02

Download

firmware_0.3.ino

Arduino code

ino - 32.01 kB - 04/03/2024 at 18:00

Download

stl.rar

housing stl

x-compressed - 1.82 MB - 04/03/2024 at 18:00

Download

  • 1 × Rotary encoder EC28A1550401
  • 1 × Wemos D1 Mini
  • 1 × 20mm Bearing NSK 6804 RS 492
  • 1 × Display 0,96 Inch OLED Display Modul SSD1306 Development Kits, Boards and Systems / Intellectual Property Cores
  • 2 × 6x6x5mm Panel PCB Momentary Tactile switch

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates