From 25a2a23aa96617414712a8717fb0f47e270cc845 Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Sun, 30 May 2021 20:05:28 +0200 Subject: [PATCH] Create README.md --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..99c24be --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +# Slider Volume Controll Voicemeeter + +This project is based on deej and the Voicemeeter API. + + +## Installation + +1.Use the Arduino IDE to upload this code to the Arduino. + +```C +const int NUM_SLIDERS = 8; //Edit based on the sliders you have. +const int analogInputs[NUM_SLIDERS] = {A0, A1, A2, A3, A4, A5, A6, A7}; //Edit based on the sliders you have. + +int analogSliderValues[NUM_SLIDERS]; + +void setup() { + for (int i = 0; i < NUM_SLIDERS; i++) { + pinMode(analogInputs[i], INPUT); + } + + Serial.begin(9600); +} + +void loop() { + updateSliderValues(); + sendSliderValues(); // Actually send data (all the time) + // printSliderValues(); // For debug + delay(10); +} + +void updateSliderValues() { + for (int i = 0; i < NUM_SLIDERS; i++) { + analogSliderValues[i] = analogRead(analogInputs[i]); + } +} + +void sendSliderValues() { + String builtString = String(""); + + for (int i = 0; i < NUM_SLIDERS; i++) { + builtString += String((int)analogSliderValues[i]); + + if (i < NUM_SLIDERS - 1) { + builtString += String("|"); + } + } + + Serial.println(builtString); +} + +void printSliderValues() { + for (int i = 0; i < NUM_SLIDERS; i++) { + String printedString = String("Slider #") + String(i + 1) + String(": ") + String(analogSliderValues[i]) + String(" mV"); + Serial.write(printedString.c_str()); + + if (i < NUM_SLIDERS - 1) { + Serial.write(" | "); + } else { + Serial.write("\n"); + } + } +} +``` +2. Download Autohotkey if you want to run the Project hidden. +3. Put the release file in the startup folder. (Or other folders) ​ + + +### Contributing +Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. + +Please make sure to update tests as appropriate. + +## License +[MIT](https://choosealicense.com/licenses/mit/)