Hi, I am tinkering with the encoder example and I have the following problems.
I want to keep the output_value between 0 and 3, and somehow it counts to 4, and when decrementing, it starts at -1 instead of 3.
(in the increment section: if output_value > 3, output_value = 0
in the decrement section: if output_value < 0, output_value = 3)
the other problem is that I cant manage to invert the values in the array,
using the encoder button.
I googled this, but I cannot find the specific answer.
beat is an array of [4] {1, 1, 1, 1 }
which is meant to be the gate sequence.
output_value is the number created by the encoder.
I must say, I would never have thought of that. I’ve been a C programmer for about 35 years, professionally.
Another way, even less obvious: beat[output_value] ^= 1;