My Code for Week 2; music


#1

I tried to do the first part of “Twinkle, Twinkle little star” but no matter what I tried it arduino wouldn’t compile fast enough to upload it to the jewelbot before it timed out, so I did not get to test it but I hope that it works properly so here it is:

Timer timer;
LED led;
Animation animate;
Buzzer buzz;
void button_press(void) {
timer.pause(1000);
animate.breathe_single_color(WHITE);
timer.pause(800);
animate.breathe_single_color(WHITE);
timer.pause(800);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.long_buzz();
animate.breathe_single_color(WHITE);
timer.pause(1000);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.short_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
buzz.extra_long_buzz();
animate.breathe_single_color(WHITE);
timer.pause(500);
led.flash_all(CYAN, 500);
timer.pause(1000);
animate.jewelbots_logo();


#2

Amazing! Trying now. :musical_keyboard::headphones::microphone::musical_score:


#3

Thank you! Please let me know if it works! :crossed_fingers:


#4

Hey @Cloudjumper, I’m sorry you’re having trouble uploading to your Jewelbots! Can you tell me what is happening when you try? Would love to get this fixed for you.


#5

Yes, I can. I don’t think it’s the jewelbot, the problem is when I hit upload the program gets stuck compiling, and it’s the same spot every time, and the jewelbot times out before it gets unstuck


#6

that happens to me, too