Advertisement
honey_the_codewitch

new on_click

Dec 9th, 2022 (edited)
1,291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. static void button_2_on_click(int clicks,void* state) {
  2.     if(clicks==4) {
  3.         do_request(speaker_index,vol_down_url);    
  4.     } else if(clicks==3) {
  5.         do_request(speaker_index,vol_up_url);    
  6.     } else if(clicks==2) {
  7.         do_request(speaker_index,prev_track_url);    
  8.     } else if(clicks==1) {
  9.         do_request(speaker_index,play_pause_url)
  10.     }
  11.     // reset the dimmer
  12.     dimmer.wake();
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement