// In reality they are tri-purpose; ADC, Digital, Digital Interrupts
// Unfortunately the interrupt mode is unusable in this scenario, but digital I/O works :P
pinMode(A2, INPUT);
+ digitalWrite(A2, HIGH);
// Debugging: how long does the main loop take on avg...
t = micros();
boolean check_key( int key)
{
- return ( keys[key] && !prev_keys[key] );
+ return ( !keys[key] && prev_keys[key] );
}
void mplx_select(int pin)
lcd.print( model.dr[pos] );
- if ( keys[KEY_INC] ) {
+ if ( !keys[KEY_INC] ) {
if ( model.dr[pos] < 100) model.dr[pos] += 5;
return;
}
- else if ( keys[KEY_DEC] ) {
+ else if ( !keys[KEY_DEC] ) {
if ( model.dr[pos] > -100) model.dr[pos] -= 5;
return;
}
-\r
+