Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AlexGyver/Arduino_Ambilight.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Библиотеки/FastLED-master/extras/RainbowDemo.s65')
-rw-r--r--Библиотеки/FastLED-master/extras/RainbowDemo.s6589
1 files changed, 89 insertions, 0 deletions
diff --git a/Библиотеки/FastLED-master/extras/RainbowDemo.s65 b/Библиотеки/FastLED-master/extras/RainbowDemo.s65
new file mode 100644
index 0000000..2de6233
--- /dev/null
+++ b/Библиотеки/FastLED-master/extras/RainbowDemo.s65
@@ -0,0 +1,89 @@
+; "Rainbow with glitter" demo
+; for "FastLED6502"
+;
+; Runs on an Apple ][, ][+, //e, or //gs
+;
+; Supports APA102, Adafruit DotStar,
+; LPD8806, and WS2801 LED strips.
+;
+; LED strip connects to game port pins,
+; see FastLED6502.s65 for details.
+;
+; Mark Kriegsman, February 2015
+
+#define NUM_LEDS 100
+#define BRIGHTNESS 64
+#define CHIPSET APA102
+#define DATA_PIN 14
+#define CLOCK_PIN 5
+
+ * = $6000
+
+#include "FastLED6502.s65"
+#include "AppleII.s65"
+
+gHue .byt 0
+gHueDelta .byt 17
+gHueSpeed .byt 7
+
+
+Setup
+ lda #0
+ sta gHue
+
+Loop
+ lda gHue
+ clc
+ adc gHueSpeed
+ sta gHue
+ ldx gHue
+ ldy gHueDelta
+; Fill RGB array with HSV rainbow
+ jsr FastLED_FillRainbow_XY
+; Use master brightness control
+ lda #BRIGHTNESS
+ sta FastLED_Brightness
+CheckOpenApple
+ bit OpenApple
+ bpl CheckSolidApple
+; Add glitter if requested
+ jsr AddGlitter
+CheckSolidApple
+ bit SolidApple
+ bpl DoDisplay
+; Pulse brightness if requested
+ jsr PulseBrightness
+DoDisplay
+; This is where the magic happens
+ jsr FastLED_Show
+ jmp Loop
+
+
+AddGlitter
+ ldy #3
+MaybeAdd1Glitter
+ jsr FastLED_Random8
+ cmp FastLED_NumPixels
+ bcs SkipThis1Glitter
+ tax
+ lda #$FF
+ sta ledsR,x
+ sta ledsG,x
+ sta ledsB,x
+SkipThis1Glitter
+ dey
+ bne MaybeAdd1Glitter
+ rts
+
+
+PulseBrightness
+ lda #13
+ jsr FastLED_Beat8
+ clc
+ adc #12
+ bcc PulseBright1
+ lda #$FF
+PulseBright1
+ sta FastLED_Brightness
+ rts
+ \ No newline at end of file