CyberGene
AlexanderBunt Just a whole lot of if else statements won't work I think (far too slow) and makes a true mess of the code of course.
This isn't necessarily true. For instance, when you want fast digital read on the Teensy, they advise that digitalFastRead() works only with a pin parameter that is a constant, e.g: digitalReadFast(10) instead of looping some variable and doing digitalReadFast(i). That is why my code looks so ugly with no for loops. As a Java dev who is used to writing nice code that goes through merciless reviews, I couldn't look at what I had to write for the Cybrid 😃
I'm not sure that applies to the analog read though.
As to advices for writing the code, I can give you a very simple example in how to loop through multiple CNY70-s by using the Arduino based (high-level) language, however I'm afraid you may need lower-level C-stuff that would directly use the underlying microcontroller and I'm of no use here since I've never been good with low-level programming...
