Using led.on and Animations Together


#1

Is there a way to use the led.on feature and the animations together? I was just curious if it was possible because when I tried to do this pattern, led.on, animation, led.on, it went straight to the animation and skipped the LED’s. I thought it would be cool if that was possible, so I asked!


#2

I love that idea, and you should! It’s possible the LED.on is happening too fast to see. Can you copy->paste your code in here so I can test?


#3

Sure! Just a second.


#4

#include “Arduino.h”
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
LED led;
led.on(0, “blue”, 650000);
led.on(1, “blue”, 650000);
led.on(2, “blue”, 650000);
led.on(3, “blue”, 650000);

Animation animation;
animation.jewelbots_logo();

led.on(0, “blue”, 650000);
led.on(1, “blue”, 650000);
led.on(2, “blue”, 650000);
led.on(3, “blue”, 650000);
}


#5

And for another project, it says “unqualified-id before if.” What does that mean?


#6

Looking into this today!


#7

hmmm, can you paste the code for that one in here as well?


#8

What do I need to use?


#9

On that grey thing in your post it says use. 0.o


#10

Okay! We made some changes to the library that should fix this.

If you are in the Arduino IDE, you need to re-install the board.

  1. Open the IDE and go to Tools->Board->Board Manager
  2. Find the Jewelbots Arduino Library and click on it, click un-install and confirm. then hit install. This will install our updates.

Then, run your sketch again! This should look awesome.


#11

Thanks! This will be cool. :smile:


#12

Sara, I tried to run the code, and when it uploaded, only one blue light came on and now my jewelbot is stuck there and it won’t turn off, go back to coding mode or reset. should I press the reset button to make it go back:?


#13

And when i try to do the firmware update i can’t because it wont go into coding mode.


#14

I am going to press the reset button.


#15

After I pushed the reset button, it worked again! Yay! I was scared it would not work. I then updated the firmware, and now it is working again. Do you know why just one led went blue in the first place?


#16

Apparently somebody else had the same problem, but it was just the led coming on for 650 seconds. Whoops :joy:


#17

Oh, great! Glad to hear.


#18

Do you know why the code that worked before the update worked and now it is not because the animation plus the led,on is not working together, and the led’s are coming on one at a time.