Skip to content
Rodion Gorkovenko edited this page Sep 15, 2018 · 2 revisions

The program uses line of 8 leds to create 3 different simple dynamic effects. Effects could be changed by pressing buttons. Potentiometer affects speed.

1 pin 10;-2
2 pin 11;-2
3 pin 12;-2
10 dim e 50 b
20 data 0x55 0xAA 0
21 data 0x49 0x92 36 0
22 data 0x33 0x66 0xCC
23 data 0x99 0
25 efkt=0
30 c=0
40 gosub 100
45 c=c+1
50 if e(c)=0;c=efkt
55 delay 100+adc(3)/5
60 if pin(10)=0;efkt=0
61 if pin(11)=0;efkt=3
62 if pin(12)=0;efkt=7
70 goto 40
100 d=e(c)
105 i=2
110 pin i;d%2
115 d=d/2
120 i=i+1
125 if i<10;goto 110
130 return

Link to load and run this code in web-emulator:

https://miskatino.github.io/miskatino-basic/#CjEgcGluIDEwOy0yCjIgcGluIDExOy0yCjMgcGluIDEyOy0yCjEwIGRpbSBlIDUwIGIKMjAgZGF0YSAweDU1IDB4QUEgMAoyMSBkYXRhIDB4NDkgMHg5MiAzNiAwCjIyIGRhdGEgMHgzMyAweDY2IDB4Q0MKMjMgZGF0YSAweDk5IDAKMjUgZWZrdD0wCjMwIGM9MAo0MCBnb3N1YiAxMDAKNDUgYz1jKzEKNTAgaWYgZShjKT0wO2M9ZWZrdAo1NSBkZWxheSAxMDArYWRjKDMpLzUKNjAgaWYgcGluKDEwKT0wO2Vma3Q9MAo2MSBpZiBwaW4oMTEpPTA7ZWZrdD0zCjYyIGlmIHBpbigxMik9MDtlZmt0PTcKNzAgZ290byA0MAoxMDAgZD1lKGMpCjEwNSBpPTIKMTEwIHBpbiBpO2QlMgoxMTUgZD1kLzIKMTIwIGk9aSsxCjEyNSBpZiBpPDEwO2dvdG8gMTEwCjEzMCByZXR1cm4KcnVuCg==

Clone this wiki locally