Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int withinBoundsCounter = 0
- int cycleCounter = 0;
- cycleCounter++;
- if (withinBounds == 1) withinBoundsCounter++;
- if (cycleCounter > 500){
- if (withinBoundsCounter > 400){
- beginLoadingSequence();
- }
- cycleCounter=0;
- withinBoundsCounter=0;
- }
- }
- void beginLoadingSequence(){
- int angle = 0;
- for (angle=0; angle<135; angle++){
- delayMicroseconds(220); //approx. 3 seconds
- }
- delayMicroseconds(30000);
- for (angle=135; angle>0; angle--){
- delayMicroseconds(220); //approx. 3 seconds
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement