void updateControl(){
static byte cnt = 0;
static byte stepVar = 0;
byte buttons = ~readRegGPIO(MCP23S18_GPIOB); // this line would probably be replaced with whatever you use to get your step variable from, I use an external chip connected to 8 buttons for 8 steps
static byte buttons_last;
if(buttons && (buttons != buttons_last)) // if some input on the buttons has changed, update step var
stepVar ^= buttons & ~buttons_last;
buttons_last = buttons;
if(kMetro.ready()){
byte val = ~(1 << (cnt%8)) ^ ~stepVar;
stepVoiceOnOff = val & (1<<(cnt%8));
cnt++;
}
}
On Monday, February 1, 2016 at 2:31:46 PM UTC+1, Mariano Velamazán wrote:
Thanks