If an APP using midio128 does not deal with encoders, pots, etc. Is the applicatble code just deleted, Semi colon placed in front of the code lines, or what.
It’s just not there
midio128 is an app itself, and it only includes the very basic code needed to handle digital inputs and outputs. Anything beyond that (like encoders etc) needs to be added in by you.
I did notice that on some apps, VOID was at the beginning of some of the lines of code
Those will be C apps - that line is there to specify the type of value that the function will return.
For a highly simplified example, let’s say I have a function to write a variable to a bankstick. The function can be called “WritetoBS”, the variable we write could be an 8-bit value - known as an “unsigned char” in C terminology. We could define the function like so:
void WritetoBS(unsigned char myVariable) { // this says 'void' which means this function does not return anything, it just does what it's told and that's all
// your code goes here
// in C, lines starting with "//" are comments - they are just for humans to read, and ignored by the compiler
// just like a semicolon in assembly
/* with most compilers, you can also start a comment section like this
and then everything after it is a comment
until you close the comment section like this */
}
Then you can use that function to write your variable like this:
WritetoBS(123);
Now this is all well and good, but, what if the write to the bankstick fails? It would be nice if your application were aware of it, so that it could retry, or notify the user or something, right?.. well to do this, we can use a return value. In that case, we could define the function as so:
unsigned char WritetoBS(unsigned char myVariable) { // note that this function returns an unsigned char
// your code goes here
// we will somehow determine the success of the write to the bankstick
// and we will set a variable called 'writefailed' accordingly
// so that we can use it like this:
if (writefailed == 1) {
return 1; // this is where we return the value to the caller. it's 1 if something failed...
} else {
return 0; // ...and it's 0 if everything went OK
}
}
Now we can call this function like so:
thereWasAnError = WritetoBS(123); // this function will now know, whether the write to bankstick function was successful
if (thereWasAnError) then doErrorHandling(); // and if it failed, it can do some error handling
Personally, I would rather be told, “go read this or that, dumbie” rather then no comment at all. Please don’t leave those of us who struggle with the software behind in the dust.
Sorry you had to wait… real life is kicking my ass right now. You can be sure, that if you get my attention like you did, you’ll get an answer… sometimes it might just take a while. Of course you can feel free to give me a friendly reminder if it seems like I have forgotten you, as sometimes my memory fails, and even more often, my PC that arranges my schedule fails too 
Midibox with all of its ramifications has opened up many, many opportunities for me to learn new things. I applaud your work TK and you to Stryd_one, and greatly appreciate what you have developed.
You’re very kind, but I’m just a janitor
TK gets all the credit here. Although, it is tempting to try and bask in his glory 
If you are using DIN4x with 128 input pins. Will mios function MIOS_DIN_SRGet output a hex number that in binary form, represents the status of each of the 128 input pins?
It will only return the number that represents the state of 8 pins == one Shift Register == DINx1.
The intent is to read the status of 128 input pins and save in the form of a number which can be recalled, transferred to the dout SR register and output to devices. Output pin status to match original input pin status.
You can do this easily with a for loop in C, somethng like so: (pseudocode, check it first for errors!)
unsigned char DIN_States[NUM_DINS]; // declare an array to hold the DIN pin states. Do this in your header file, or at the top of your C file, not inside a function where it would be temporary! NUM_DINS is a #define which tells the app how many pins you use. In your case, it would be 128.
....
....
// here is your function to read all the pins
unsigned char counter; // a declaration
for (counter = 0, counter < NUM_DINS; counter++) { // do the below until you have all the pin values
DIN_States[counter] = MIOS_DIN_SRGet(counter); // store a SR's pin states in your array
}
However, that’s just one way to do it. You could also use the USER_DIN_NotifyToggle() functions, to set only the pins you change, rather than all of them, which could be better for performance. It really depends on what you need…
Does that help at all?