Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& (rx.byte2 == 0x23)) //kick off
- {
- digitalWrite(2, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& (rx.byte2 == 0x23)) //kick on
- {
- digitalWrite(2, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x25) || (rx.byte2 == 0x26) || (rx.byte2 == 0x28)) ) //snare/rim
- {
- digitalWrite(5, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x25) || (rx.byte2 == 0x26) || (rx.byte2 == 0x28)) ) //snare/rim
- {
- digitalWrite(5, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2A) ) ) //closed hi hat
- {
- digitalWrite(4, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2A) ) )
- {
- digitalWrite(4, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2C) ) ) //pedal hi hat
- {
- digitalWrite(6, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2C) ) )
- {
- digitalWrite(6, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2E) ) ) //open hi hat
- {
- digitalWrite(8, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2E) ) )
- {
- digitalWrite(8, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x31) || (rx.byte2 == 0x39)) ) //crash
- {
- digitalWrite(9, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x31) || (rx.byte2 == 0x39)) )
- {
- digitalWrite(9, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x39) || (rx.byte2 == 0x3B)) ) //ride
- {
- digitalWrite(3, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x39) || (rx.byte2 == 0x3B)) )
- {
- digitalWrite(3, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x35) ) ) //ride bell
- {
- digitalWrite(10, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x35) ) )
- {
- digitalWrite(10, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x29) || (rx.byte2 == 0x2B)) ) //low tom
- {
- digitalWrite(16, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x29) || (rx.byte2 == 0x2B)) ) //low tom
- {
- digitalWrite(16, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2D) || (rx.byte2 == 0x2F)) ) //mid tom
- {
- digitalWrite(14, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2D) || (rx.byte2 == 0x2F)) )
- {
- digitalWrite(14, LOW);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x30) || (rx.byte2 == 0x32)) ) //high tom
- {
- digitalWrite(7, HIGH);
- }
- if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x30) || (rx.byte2 == 0x32)) )
- {
- digitalWrite(7, LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement