Advertisement
Guest User

Untitled

a guest
Jan 27th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. //2D array:
  2. const uint8_t bpm_array [][4] = {
  3.     {29, 20, 140, 22},
  4.     {34, 72,  64, 64},
  5. };
  6.  
  7.  
  8. void bpm_arr_play(uint8_t arrNum) {
  9.     uint8_t beat = beatsin88(bpm_array[arrNum][0], bpm_array[arrNum][1], bpm_array[arrNum][2]);
  10.         for ( uint8_t i = 0; i < NUM_LEDS; i++)
  11.         {leds[i] = ColorFromPalette(currentPalette, gHue + i, bpm_array[arrNum][3]);
  12. }
  13. }
  14.  
  15. //lets play with this params: {34, 72, 64, 64}
  16. bpm_arr_play (1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement