Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1.  
  2. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& (rx.byte2 == 0x23)) //kick off
  3. {
  4. digitalWrite(2, HIGH);
  5. }
  6. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& (rx.byte2 == 0x23)) //kick on
  7. {
  8. digitalWrite(2, LOW);
  9. }
  10.  
  11. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x25) || (rx.byte2 == 0x26) || (rx.byte2 == 0x28)) ) //snare/rim
  12. {
  13. digitalWrite(5, HIGH);
  14. }
  15. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x25) || (rx.byte2 == 0x26) || (rx.byte2 == 0x28)) ) //snare/rim
  16. {
  17. digitalWrite(5, LOW);
  18. }
  19.  
  20.  
  21. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2A) ) ) //closed hi hat
  22. {
  23. digitalWrite(4, HIGH);
  24. }
  25. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2A) ) )
  26. {
  27. digitalWrite(4, LOW);
  28. }
  29.  
  30. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2C) ) ) //pedal hi hat
  31. {
  32. digitalWrite(6, HIGH);
  33. }
  34. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2C) ) )
  35. {
  36. digitalWrite(6, LOW);
  37. }
  38.  
  39. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2E) ) ) //open hi hat
  40. {
  41. digitalWrite(8, HIGH);
  42. }
  43. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2E) ) )
  44. {
  45. digitalWrite(8, LOW);
  46. }
  47.  
  48. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x31) || (rx.byte2 == 0x39)) ) //crash
  49. {
  50. digitalWrite(9, HIGH);
  51. }
  52. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x31) || (rx.byte2 == 0x39)) )
  53. {
  54. digitalWrite(9, LOW);
  55. }
  56.  
  57. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x39) || (rx.byte2 == 0x3B)) ) //ride
  58. {
  59. digitalWrite(3, HIGH);
  60. }
  61. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x39) || (rx.byte2 == 0x3B)) )
  62. {
  63. digitalWrite(3, LOW);
  64. }
  65.  
  66. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x35) ) ) //ride bell
  67. {
  68. digitalWrite(10, HIGH);
  69. }
  70. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x35) ) )
  71. {
  72. digitalWrite(10, LOW);
  73. }
  74.  
  75. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x29) || (rx.byte2 == 0x2B)) ) //low tom
  76. {
  77. digitalWrite(16, HIGH);
  78. }
  79. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x29) || (rx.byte2 == 0x2B)) ) //low tom
  80. {
  81. digitalWrite(16, LOW);
  82. }
  83.  
  84.  
  85. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x2D) || (rx.byte2 == 0x2F)) ) //mid tom
  86. {
  87. digitalWrite(14, HIGH);
  88. }
  89. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x2D) || (rx.byte2 == 0x2F)) )
  90. {
  91. digitalWrite(14, LOW);
  92. }
  93.  
  94. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x90 )&& ((rx.byte2 == 0x30) || (rx.byte2 == 0x32)) ) //high tom
  95. {
  96. digitalWrite(7, HIGH);
  97. }
  98. if (((rx.byte1 & B00001111) == 0x09) && (((rx.byte1 & B11110000)) == 0x80 )&& ((rx.byte2 == 0x30) || (rx.byte2 == 0x32)) )
  99. {
  100. digitalWrite(7, LOW);
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement