Skip to content

Commit

Permalink
Merge pull request #1 from ghostintranslation/develop
Browse files Browse the repository at this point in the history
Initial version
  • Loading branch information
ghostintranslation authored May 2, 2021
2 parents 7cf94d1 + 38b28a2 commit fc61cd3
Show file tree
Hide file tree
Showing 14 changed files with 1,986 additions and 2 deletions.
1,509 changes: 1,509 additions & 0 deletions Motherboard/Motherboard.h

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions Motherboard/Motherboard.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
__ _ _____ ___ ___ _ _ __ _ ______ _
/__|_|/ \(_ | | |\| | |_)|_||\|(_ | |_| | | / \|\|
\_|| |\_/__) | _|_| | | | \| || |__)|__| | | _|_\_/| |
MOTHERBOARD
1.0.0
Support my work:
https://www.paypal.com/paypalme/ghostintranslation
https://www.ghostintranslation.com/
https://ghostintranslation.bandcamp.com/
https://www.instagram.com/ghostintranslation/
https://www.youtube.com/channel/UCcyUTGTM-hGLIz4194Inxyw
https://github.com/ghostintranslation
*/

/**
* This is an example sketch
*/

#include "Motherboard.h"

// Motherboard
Motherboard * device;

void setup() {
Serial.begin(115200);

while (!Serial && millis() < 2500); // wait for serial monitor

// Motherboard
device = Motherboard::init(
"Motherboard",
{
Potentiometer, Potentiometer,
Potentiometer, Potentiometer,
Potentiometer, Potentiometer
}
);

// Potentiometer callback
device->setHandlePotentiometerChange(0, onPotentiometerChange);

// MIDI callback
device->setHandleMidiControlChange(0, 0, "Parameter", onMidiControlChange);

Serial.println("Ready!");
}

void loop() {
device->update();
}

/**
* Potentiometer Change
*/
void onPotentiometerChange(byte inputIndex, float value, int diffToPrevious){
Serial.print("onPotentiometerChange: ");
Serial.print(inputIndex);
Serial.print(" ");
Serial.print(value);
Serial.print(" ");
Serial.print(diffToPrevious);
Serial.println("");
}

/**
* Midi Control Change callback
*/
void onMidiControlChange(byte channel, byte control, byte value) {
Serial.print("onMidiControlChange: ");
Serial.print(channel);
Serial.print(" ");
Serial.print(control);
Serial.print(" ");
Serial.print(value);
Serial.println("");
}
Loading

0 comments on commit fc61cd3

Please sign in to comment.