Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:40 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : WS2812 Leds

Author Message
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 08:35pm 28 Feb 2024
Copy link to clipboard 
Print this post

Possibly an "obvious" answer here - but my addled brain just cant see it.

Given a strip of x5 WS2812 Leds - I understand how to set the leds and their colours using the nbr and value array.  But I am having a cognitive block on how to set the colour, but vary the brightness.

So say I want to create a "heart beat" where the colour is red, but the brightness varies in response to an analogue pin input?

Any tips?


Ps - have searched the forum and I don't "get" the answers - looking for a "dummies" guide ;-)

Px
Edited 2024-02-29 06:51 by PEnthymeme
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:09pm 28 Feb 2024
Copy link to clipboard 
Print this post

read adc and use the value to control a pwm pin to leds???a thought
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 09:12pm 28 Feb 2024
Copy link to clipboard 
Print this post

  stanleyella said  read adc and use the value to control a pwm pin to leds???a thought


I can use this to set the brightness of individual LEDs - I am Bitbang-ing these with:

BITBANG WS2812 b, pin etc
so not sure PWM will work here. (But as said, brain freeze).

P
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 09:55pm 28 Feb 2024
Copy link to clipboard 
Print this post

WS2812 uses a serial data stream so PWM won't help.
  Manual said  For the first three variants each element in the array should contain the colour
in the normal RGB888 format (i.e. 0 to &HFFFFFF).
For type W use a RGBW value (0-&HFFFFFFFF).
If only one LED is connected then a single integer should be used for value%
(ie, not an array).

So if you have the RGB variant the first two digits (8 bits or 0 to 255) of &HFFFFFF control the red led, the middle two control the green led and the last two control the blue led.

To get all red each element of the array should vary the first two from &H000000 to &Hff0000. &H0f0000 would be dim red.

Blue is easiest as the first 4 digits are 0 you can just use a number from 0 to 255.

You can get the colour numbers by Bit Shifting up to the required range.
Green = 255 << 8
Red = 255 << 16

For a analogue input scale the input range (0 to 3.3) to 0 to 255

eg
R = (Vin * 255 / 3.3) << 16

All colours can be had by adding the individual colours

colour = red<<16 + green<<8 + blue

You could also try the RGB() function which does that for you.

colour = RGB(red,green,blue)  0 to 255 for each
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 10:04pm 28 Feb 2024
Copy link to clipboard 
Print this post

  phil99 said  WS2812 uses a serial data stream so PWM won't help.
[
You can get the colour numbers by Bit Shifting up to the required range.
Green = 255 << 8
Red = 255 << 16

For a analogue input scale the input range (0 to 3.3) to 0 to 255

eg
R = (Vin * 255 / 3.3) << 16

All colours can be had by adding the individual colours

colour = red<<16 + green<<8 + blue

You could also try the RGB() function which does that for you.

colour = RGB(red,green,blue)  0 to 255 for each


DOH!!!

Thank you - just couldn't see it - even after reading the manual.

Perfectly clear now.

Px
 
Bill.b

Senior Member

Joined: 25/06/2011
Location: Australia
Posts: 226
Posted: 10:46pm 28 Feb 2024
Copy link to clipboard 
Print this post

hi Px

I send an integer either single or in an array of &H000000 for each led

 the breakdown is &H 00(Red 0 - FF) 00 (green 0 - FF) 00 (Blue 0 - FF)
i.e &h400000 will turn on the RED,  &h004000 will turn on the green etc.

I generally use values of 0 to 40 hex as this gives max brightness and uses less current the hex FF.  To very the brightness you can use a loop to very the value for 0 to 40 or use an analogue value scaled to the required range.

Bill
Edited 2024-02-29 08:50 by Bill.b
In the interests of the environment, this post has been constructed entirely from recycled electrons.
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 11:02pm 28 Feb 2024
Copy link to clipboard 
Print this post

  Bill.b said  hi Px

I send an integer either single or in an array of &H000000 for each led

 the breakdown is &H 00(Red 0 - FF) 00 (green 0 - FF) 00 (Blue 0 - FF)
i.e &h400000 will turn on the RED,  &h004000 will turn on the green etc.

I generally use values of 0 to 40 hex as this gives max brightness and uses less current the hex FF.  To very the brightness you can use a loop to very the value for 0 to 40 or use an analogue value scaled to the required range.

Bill




Thank you both - the 40 tip worked perfectly.  I have a "ring" of 24 LEDS and am currently powering it externally -- will try with this and see how the 'mite gets on.

Question - if you draw too much current is the 'mite protected from over current?

Px
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 11:10pm 28 Feb 2024
Copy link to clipboard 
Print this post

  PEnthymeme said  
Question - if you draw too much current is the 'mite protected from over current?

Px

Yes,
It's called smoke but only works once.
VK7JH
MMedit   MMBasic Help
 
Bill.b

Senior Member

Joined: 25/06/2011
Location: Australia
Posts: 226
Posted: 12:13am 29 Feb 2024
Copy link to clipboard 
Print this post

I generally use a 5v 5A supply to power the leds therefore the load on the pi is only that reqired for the serial link to the first led

This is a program I used at Christmas to control 4 5m strips of LEDs total of 600 ws2812 leds

' 150 WS2812 LED strip 4 channel arch control
' Bill Brown 16/09/2023
 Option autorun on
 Option DEFAULT NONE

' Option EXPLICIT  Randomize Timer
Dim integer count, count1, rndnum, loopcnt, indexcount,count2, count3
dim integer cyclecount,i,x,indexcount2,loopcnt2
dim integer buff1, buff2, buff3, buff4
Dim integer buffer0(200)
Dim integer buffer1(200)
Dim integer buffer2(200)
Dim integer buffer3(200)
Dim integer tempbuff(200)
Dim integer bufferRND(900)
Dim integer colour1(100)
dim integer LEDNum

SetPin GP5, DOUT   ' Strip 1
SetPin GP11, DOUT  ' strip 2
SetPin GP18, DOUT  ' strip 3
SetPin GP22, DOUT  ' Strip 4

LEDNum = 150  'Number of WS2812 LEDs / Srip, 4 * 5m 30/m strips = 600 LEDs total
 '--------------------------------------------
'Mian ---- Call each light group
do
LEDData
flag
Flash1
centerFill
fillleds2
COLOURBAND
fade
blink
colourLED
flashLED
randomdata
randomflash
FillLED3
ringcolour
COLOURBAND
LEDData
REVFillLEDs
Flash2
kit
center2
fillleds
Flash1
Restore  
loop
'************************READ AND RUN COLOUR SEQUENCE****************************************
 sub LEDdata 'read 6 light patterns
 for indexcount = 1 to 6
   For loopcnt = 0 To 149
     Read  buffer0(loopcnt)
   Next loopcnt
       'rotate data in buffer array
         For count2 = 1 To 300      'rotate data in buffer array
 
    For loopcnt = 149 To 0 Step -1

       buffer0(loopcnt + 1) = buffer0(loopcnt)
 
    Next loopcnt
 
    buffer0(0) = buffer0(149)
sendLED
   select case indexcount  'Set sequence speed
     case 1
       pause 20
     case 2
       pause 10
     case 3
       pause 10
      case 4
       pause 20
      case 5
       pause 10
      case 6
       pause 20
 
    end select
 Next count2
next indexcount

 end sub
 '***************************************************
 SUB COLOURBAND
 for count3 = 1 to 3
 for loopcnt = 0 to 149
   if count3 = 1 then
   buffer0(loopcnt) = &h101000
   buffer1(loopcnt) = &h000200
   buffer2(loopcnt) = &h000002
   buffer3(loopcnt) = &h020000
   next loopcnt
  for loopcnt = 0 to 149 step 15
      buffer0(loopcnt) = &h000030
      buffer0(loopcnt+1) = &h000030
      buffer0(loopcnt+2) = &h000030
      buffer1(loopcnt) = &h003000
      buffer1(loopcnt+1) = &h002000
      buffer1(loopcnt+2) = &h003000
      buffer2(loopcnt) = &h300000
      buffer2(loopcnt+1) = &h300000
      buffer2(loopcnt+2) = &h300000
      buffer3(loopcnt) = &h303030
      buffer3(loopcnt+1) = &h303030
      buffer3(loopcnt+2) = &h303030
   next loopcnt
   end if
   if count3 = 2 then
   buffer0(loopcnt) = &h000002
   buffer1(loopcnt) = &h000200
   buffer2(loopcnt) = &h020000
   buffer3(loopcnt) = &h100200
   next loopcnt
      for loopcnt = 0 to 149 step 15
      buffer0(loopcnt) = &h303000
      buffer0(loopcnt+1) = &h303000
      buffer0(loopcnt+2) = &h303000
      buffer1(loopcnt) = &h003000
      buffer1(loopcnt+1) = &h003000
      buffer1(loopcnt+2) = &h003000
      buffer2(loopcnt) = &h300000
      buffer2(loopcnt+1) = &h300000
      buffer2(loopcnt+2) = &h300000
      buffer3(loopcnt) = &h303030
      buffer3(loopcnt+1) = &h303030
      buffer3(loopcnt+2) = &h303030
   next loopcnt
   end if
      end if
   if count3 = 3 then
   buffer0(loopcnt) = &h000200
   buffer1(loopcnt) = &h020000
   buffer2(loopcnt) = &h020200
   buffer3(loopcnt) = &h020002
   next loopcnt
  for loopcnt = 0 to 149 step 15
      buffer0(loopcnt) = &h303000
      buffer0(loopcnt+1) = &h303000
      buffer0(loopcnt+2) = &h303000
      buffer1(loopcnt) = &h300000
      buffer1(loopcnt+1) = &h300000
      buffer1(loopcnt+2) = &h300000
      buffer2(loopcnt) = &h000030
      buffer2(loopcnt+1) = &h000030
      buffer2(loopcnt+2) = &h000030
      buffer3(loopcnt) = &h303030
      buffer3(loopcnt+1) = &h303030
      buffer3(loopcnt+2) = &h303030
   next loopcnt
   end if
   For count2 = 1 To 300
    For loopcnt = 149 To 0 Step -1

       buffer0(loopcnt + 1) = buffer0(loopcnt)
       buffer1(loopcnt + 1) = buffer1(loopcnt)
       buffer2(loopcnt + 1) = buffer2(loopcnt)
       buffer3(loopcnt + 1) = buffer3(loopcnt)
 
    Next loopcnt
 
    buffer0(0) = buffer0(149)
     buffer1(0) = buffer1(149)
      buffer2(0) = buffer2(149)
       buffer3(0) = buffer3(149)
    sendLED2
    'pause  10
    next count2
    next count3
 end sub

  sub flag

for count3 = 1 to 4
  for loopcnt = 0 To 74 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h400000
   next count
    Next loopcnt
     for loopcnt = 75 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h404040
   next count
    Next loopcnt
       for loopcnt = 149 To 175 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h000040
   next count
   Next loopcnt
   sendLED
 
    pause 500
   
  for loopcnt = 0 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h000040
   next count
    Next loopcnt
     for loopcnt = 74 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h400000
   next count
    Next loopcnt
       for loopcnt = 74 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h404040
   next count
   Next loopcnt
   sendLED
   pause 500
   
  for loopcnt = 0 To 74 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h404040
   next count
    Next loopcnt
     for loopcnt = 75 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h000040
   next count
    Next loopcnt
       for loopcnt = 74 To 149 Step 10
  for count = 0 to 9
   buffer0(loopcnt + count) = &h400000
   next count
   Next loopcnt
   sendLED
   pause 500
   next count3
end sub

'********************fill from center *****************
sub centerFill

  For loopcnt = 0 To 169
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
   Next loopcnt
   sendLED2
   for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer2(loopcnt) = &h300000
         
       buffer1(count3) = &h300000
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer3(loopcnt) = &h300000
       buffer0(count3) = &h300000
           sendled2
          next loopcnt

       pause 10
           for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer0(loopcnt) = &h003000
         
       buffer3(count3) = &h003000
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer1(loopcnt) = &h003000
       buffer2(count3) = &h003000
           sendled2
          next loopcnt

       pause 10
       '------------------------------------------------------
           for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer2(loopcnt) = &h000030
         
       buffer1(count3) = &h000030
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer3(loopcnt) = &h000030
       buffer0(count3) = &h000030
           sendled2
          next loopcnt

       pause 10
           for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer0(loopcnt) = &h301000
         
       buffer3(count3) = &h301000
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer1(loopcnt) = &h301000
       buffer2(count3) = &h301000
           sendled2
          next loopcnt
        pause 10
        '----------------------------------------------------------
            for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer2(loopcnt) = &h300030
         
       buffer1(count3) = &h300030
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer3(loopcnt) = &h300030
       buffer0(count3) = &h300030
           sendled2
          next loopcnt

       pause 10
           for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer0(loopcnt) = &h003030
         
       buffer3(count3) = &h003030
         sendled2
      next loopcnt
      pause 10
 
  for loopcnt= 0 to 149
     count3 = 149 - loopcnt
       buffer1(loopcnt) = &h003030
       buffer2(count3) = &h003030
           sendled2
          next loopcnt

       pause 10
    end sub
'***************************ROTATE COLOUR**************************************
sub ringcolour
  For loopcnt = 0 To 169
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
   Next loopcnt
   sendLED2
   for loopcnt= 0 to 149
       buffer0(loopcnt) = &h300000
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer1(loopcnt) = &h303030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer2(loopcnt) = &h000030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer3(loopcnt) = &h303000
       sendLED2
       pause 10
      '_____________________________
    next loopcnt
          For loopcnt = 0 To 169
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
   Next loopcnt
   sendLED2
      for loopcnt= 150 to 0 step -1
       buffer3(loopcnt) = &h303000
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 150 to 1 step -1
       buffer2(loopcnt) = &h000030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 150 to 1 step -1
       buffer1(loopcnt) = &h303030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 150 to 1 step -1
       buffer0(loopcnt) = &h300000
       sendLED2
       pause 10
    next loopcnt
       '_____________________________
   
       For loopcnt = 0 To 169
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
   Next loopcnt
   sendLED2
    for loopcnt= 0 to 149
       buffer0(loopcnt) = &h301000
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer1(loopcnt) = &h300030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer2(loopcnt) = &h003030
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 0 to 149
       buffer3(loopcnt) = &h003000
       sendLED2
       pause 10
    next loopcnt
    '----------------------------------------
 
       For loopcnt = 0 To 169
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
   Next loopcnt
   sendLED2
    for loopcnt= 150 to 1 step -1
       buffer3(loopcnt) = &h301000
       sendLED2
       pause 10
    next loopcnt
      for loopcnt= 150 to 1 step -1
       buffer2(loopcnt) = &h300030
       sendLED2
       pause 10
    next loopcnt
     for loopcnt= 150 to 1 step -1
       buffer1(loopcnt) = &h003030
       sendLED2
       pause 10
    next loopcnt
     for loopcnt= 150 to 1 step -1
       buffer0(loopcnt) = &h003000
       sendLED2
       pause 10
    next loopcnt
    end sub
'**************************flash 4 colours**********************************
sub blink  
for loopcnt = 1 to 5
 
      for count1 = 0 to 149
        buffer0(count1) = &h300000
 
        buffer3(count1) = &h000000
      next count1
      sendLED2
       pause 300
          for count1 = 0 to 149
        buffer0(count1) = &h000000
        buffer1(count1) = &h003000
 
      next count1
      sendLED2
       pause 300
     for count1 = 0 to 149
   
     
        buffer1(count1) = &h000000
        buffer2(count1) = &h000030
     
      next count1
      sendLED2
       pause 300
     for count1 = 0 to 149
 
        buffer2(count1) = &h000000
        buffer3(count1) = &h303030
      next count1
      sendLED2
       pause 300
         for count1 = 0 to 149
        buffer0(count1) = &h300030

        buffer3(count1) = &h000000
      next count1
      sendLED2
       pause 300
              for count1 = 0 to 149
        buffer0(count1) = &h000000
        buffer1(count1) = &h301000
     
     
      next count1
     
      sendLED2
       pause 300
             for count1 = 0 to 149
     
        buffer1(count1) = &h000000
        buffer2(count1) = &h300030
     
      next count1
      sendLED2
       pause 300
               for count1 = 0 to 149

        buffer2(count1) = &h000000
        buffer3(count1) = &h303000
      next count1
      sendLED2
       pause 300
     
       next loopcnt
end sub
'*****************************************************************
   sub colourLED
    For loopcnt = 0 To 149
       buffer0(loopcnt) = &h000000
       buffer1(loopcnt) = &h000000
       buffer2(loopcnt) = &h000000
       buffer3(loopcnt) = &h000000
     Next loopcnt
   
     for loopcnt = 1 to 6
     for count1 = 0 to 149 step 10
     for count = 0 to 9
      buffer0(count1 + count) = &h003000
       buffer1(count1 + count) = &h300000
       buffer2(count1 + count) = &h303030
       buffer3(count1 + count) = &h000030
      next count
      sendLED2
       pause 30
     next count1
    for count1 = 0 to 149 step 10
     for count = 0 to 9
       buffer0(count1 + count) = &h003030
       buffer1(count1 + count) = &h301000
       buffer2(count1 + count) = &h300030
       buffer3(count1 + count) = &h303000
      next count
      sendLED2
       pause 30
     next count1
    for count1 = 0 to 149 step 10
     for count = 0 to 9
       buffer0(count1 + count) = &h003000
       buffer1(count1 + count) = &h303030
       buffer2(count1 + count) = &h303000
       buffer3(count1 + count) = &h300030
      next count
      sendLED2
     
       pause 30
     next count1
      for count1 = 149 to 0 step - 10
      for count = 0 to 9
        buffer0(count1 + count) = &h003000
        buffer1(count1 + count) = &h300000
        buffer2(count1 + count) = &h303030
        buffer3(count1 + count) = &h000030
      next count
      sendLED2
      pause 30
     next count1
        for count1 = 149 to 0 step - 10
        for count = 0 to 9
         buffer0(count1 + count) = &h003030
         buffer1(count1 + count) = &h301000
         buffer2(count1 + count) = &h300030
         buffer3(count1 + count) = &h303000
      next count
      sendLED2
       pause 30
     next count1
        for count1 = 149 to 0 step - 10
        for count = 0 to 9
         buffer0(count1 + count) = &h003000
         buffer1(count1 + count) = &h303030
         buffer2(count1 + count) = &h303000
         buffer3(count1 + count) = &h300030
      next count
      sendLED2
       pause 30
     next count1
next loopcnt
   end sub
   
 '************************FAD COLOUR UP AND DOWN***********************************
 sub fade
 
 
   For count = 0 To 449  'Reset all LED to OFF
      bufferRND(count) = 00
     
  Next count
   sendledrnd
  for count3 = 1 to 60
 for count = 0 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
'  pause 5
 next count3
   for count3 = 60 to 0 step -1
 for count = 0 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
'  pause 5
 next count3
 '----------------------------

   sendledrnd
   for count3 = 0 to 60
 for count = 1 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
'  pause 5
 next count3
   for count3 = 60 to 1 step -1
 for count = 1 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
'  pause 5
 next count3
 '-----------------------------

     for count3 = 0 to 60
 for count = 2 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
'  pause 5
 next count3
   for count3 = 60 to 1 step -1
 for count = 2 to 449 step 3
 
 bufferrnd(count) = count3

 next count

  sendledrnd
 ' pause 5
 next count3
 '------------------------------------

     for count3 = 0 to 60
 for count = 0 to 459 step 3
 
 bufferrnd(count) = count3
bufferrnd(count + 1) = count3
 next count

  sendledrnd
'  pause 5
 next count3
   for count3 = 60 to 1 step -1
 for count = 0 to 459 step 3
 
 bufferrnd(count) = count3
 bufferrnd(count + 1) = count3

 next count

  sendledrnd
'  pause 5
 next count3
 '------------------------------------

     for count3 = 0 to 60
 for count = 0 to 459 step 3
 
 bufferrnd(count) = count3
bufferrnd(count + 2) = count3
 next count

  sendledrnd
'  pause 5
 next count3
   for count3 = 60 to 1 step -1
 for count = 0 to 459 step 3
 
 bufferrnd(count) = count3
 bufferrnd(count + 2) = count3

 next count

  sendledrnd
'  pause 5
 next count3
 end sub
 '*************************RANDOM COLOUR ******************
sub randomdata
 
  For count = 0 To 449  'Reset all LED to OFF
     bufferRND(count) = 00
   
  Next count
 sendledrnd
   for count1 = 1 to 50       'repeat random lights 150 times
     for count = 0 to 1000
 
       rndnum = Int(RND()*840)+1           'Set array size and set data - Number of LEDs * 3
       BufferRND(rndnum) = count * 40 and 40  'Set Brightness of LED
      next count
     sendLEDrnd
     pause 100
   next count1
   pause 90
 end sub
   '************************* Ransom flash***************************************
   sub randomflash
   randomize(timer)
     for count1 = 1 to 100
     rndnum = Int(RND()*10)
   Select case rndnum
   case 0
    For count = 0 To 150  'Reset all LED to OFF
     buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        buffer0(count) = &h300000
        next count
        sendLED2
         pause 350
     case 1
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        Buffer2(count) = &h000030
        Buffer3(count) = &h301000
        next count
        sendLED2
        pause 350
     case 2
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        Buffer1(count) = &h003000
        next count
        sendLED2
        pause 350
     case 3
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        buffer0(count) = &h003030
        next count
        sendLED2
        pause 350
     case 4
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        Buffer3(count) = &h303000
        next count
        sendLED2
        pause 350
     case 5
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        Buffer3(count) = &h303030
        Buffer1(count) = &h300030
        next count
        sendLED2
        pause 350
     case 6
      For count = 0 To 150  'Reset all LED to OFF
       buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
     next count
     sendLED2
        for count = 0 to 149
        Buffer2(count) = &h03030
        Buffer1(count) = &h300030
        next count
        sendLED2
        pause 350
     case 7
        For count = 0 To 150  'Reset all LED to OFF
          buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
        next count
        sendLED2
        for count = 0 to 149
          buffer0(count) = &h300030
           Buffer1(count) = &h300000
        next count
        sendLED2
        pause 350
     case 8
        For count = 0 To 150  'Reset all LED to OFF
           buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
        next count
        sendLED2
        for count = 0 to 149
          Buffer3(count) = &h000030
        next count
        sendLED2
        pause 350
     case 9
        For count = 0 To 150  'Reset all LED to OFF
           buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
        next count
        sendLED2
        for count = 0 to 149
          buffer0(count) = &h000030
          Buffer1(count) = &h300030
          Buffer2(count) = &h303030
          Buffer3(count) = &h300000
        next count
        sendLED2
        pause 350
       end select
  Next count1
   end sub
   '*****************************FLASH LEDS***************************************************************
   sub flashLED
   
   For count = 1 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   Next count
 
   For count = 0 To 149
     buffer0(count) = &h300000
         
   Next count
   sendLED
   pause 500
   
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds&h OFF
     buffer0(count) = &h003000
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h000030
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h301000
   
   Next count
   sendLED
   pause 500
   
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
     pause 500
   
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h003030
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h303030
   
   Next count
   sendLED
   pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
     pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h003000
   
   Next count
   sendLED
   pause 500
     For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000500
   
   Next count
   sendLED
     pause 500
 
   for indexcount =1 to 2
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h303000
      buffer1(count) = &h303030
       buffer2(count) = &h003000
        buffer3(count) = &h003000
   
   Next count
   sendLED2
    pause 500
 
   For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h300000
       buffer1(count) = &h303000
       buffer2(count) = &h303030
        buffer3(count) = &h003000
   
   Next count
   sendLED2
    pause 500
   
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h300030
       buffer1(count) = &h303000
       buffer2(count) = &h003000
        buffer3(count) = &h300000
   
   Next count
   sendLED2
    pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h301000
       buffer1(count) = &h000030
       buffer2(count) = &h303000
        buffer3(count) = &h300000
   
   Next count
   sendLED2
    pause 500
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h003000
      buffer1(count) = &h303030
       buffer2(count) = &h300030
        buffer3(count) = &h003000
     
   
   Next count
   sendLED2
    pause 500

   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000030
       buffer1(count) = &h003000
       buffer2(count) = &h300000
        buffer3(count) = &h303030
   
   Next count
   sendLED2
    pause 500
 
   For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h003030
       buffer1(count) = &h303000
       buffer2(count) = &h300030
        buffer3(count) = &h003000
   
   Next count
   sendLED2
    pause 500
 
   For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h300030
       buffer1(count) = &h303030
       buffer2(count) = &h303000
        buffer3(count) = &h003030
   
   Next count
   sendLED2
    pause 500
   next indexcount
   end sub
   '***************************FLASH LEDS 2*******************************************88
   
   sub Flash2
         For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
    sendLED
   for count3 = 1 to 20
      buffer0(10) = &h300000
      buffer0(30) = &h000030
      buffer0(55) = &h303000
      buffer0(40) = &h300030
      buffer0(35) = &h303040
      buffer0(80) = &h300040
      buffer0(100) = &h303000
      buffer0(115) = &h100040
      buffer0(130) = &h103000
      buffer0(145) = &h303040
    sendLED
   pause 50
     For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   Next count
 buffer0(50) = &h300000
       buffer0(15) = &h000030
      buffer0(45) = &h303000
        buffer0(5) = &h300030
          buffer0(65) = &h300040
          buffer0(90) = &h303000
           buffer0(110) = &h301000
           buffer0(120) = &h100040
          buffer0(135) = &h103000
           buffer0(140) = &h303040
   sendLED
    pause 50
       For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
      buffer0(15) = &h300000
       buffer0(41) = &h000030
      buffer0(25) = &h303000
        buffer0(3) = &h300030
          buffer0(45) = &h303040
            buffer0(70) = &h303000
           buffer0(105) = &h303040
                buffer0(125) = &h100040
          buffer0(138) = &h103000
           buffer0(148) = &h303040
   sendLED
   pause 50
      For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
      buffer0(45) = &h300000
       buffer0(20) = &h000030
      buffer0(18) = &h303000
        buffer0(50) = &h300030
          buffer0(4) = &h303040
            buffer0(60) = &h303000
           buffer0(90) = &h303040
                buffer0(110) = &h100040
          buffer0(125) = &h103000
           buffer0(140) = &h303040
   sendLED
   pause 50
      For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
    buffer0(0) = &h300000
       buffer0(10) = &h000030
      buffer0(60) = &h303000
        buffer0(80) = &h300030
          buffer0(100) = &h303040
            buffer0(95) = &h303000
           buffer0(112) = &h303040
                buffer0(122) = &h100040
          buffer0(137) = &h103000
           buffer0(149) = &h303040
   sendLED
   pause 50
   
     For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
    next count3
    end sub
    '****************************FLAG***********************************************
    sub newflag
         For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h000000
   
   Next count
    for count3 = 1 to 3
    for count = 0 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h400000
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h404040
    next loopcnt
      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h000040
    next loopcnt
    next count
   for count = 10 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h000040
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h404040
    next loopcnt
      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h400000
    next loopcnt
    next count
    sendLED
    pause 500
    '-------------------------------
   for count = 0 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h404040
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h000040
    next loopcnt
      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h400000
    next loopcnt
    next count
   for count = 10 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h400000
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h000040
    next loopcnt

      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h404040
    next loopcnt
    next count
    sendLED
    pause 500
    '---------------------------------------
     for count = 0 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h000040
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h400000
    next loopcnt
      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h404040
    next loopcnt
    next count
   for count = 10 to 149 step 20
    for loopcnt = 0 to 2
    buffer0(count+loopcnt) = &h404040
    next loopcnt
      for loopcnt = 3 to 6
    buffer0(count+loopcnt) = &h400000
    next loopcnt
      for loopcnt = 7 to 9
    buffer0(count+loopcnt) = &h000040
    next loopcnt
    next count
    sendLED
  pause 500
    next count3
    pause 500
     end sub
     '*****************************kIT SIMULATION**************************************************
       sub Kit
   for count = 0 To 149
     buffer0(count) = 00
   Next count
   sendLED
   'for loopcnt = 1 to 2
     for count1 = 2 to 149   'Run the  LED from end to end and return
       buffer0(count1) = &h300000
       Buffer1(count1) = &h003000
       Buffer2(count1) = &h300030
       Buffer3(count1) = &h303030
       buffer0(count1+1) = &h100000
       Buffer1(count1+1) = &h001000
       Buffer2(count1+1) = &h100010
       Buffer3(count1+1) = &h101010
       buffer0(count1+2) = &h020000
       Buffer1(count1+2) = &h000200
       Buffer2(count1+2) = &h020002
       Buffer3(count1+2) = &h020202
       pause 5
   
        buffer0(count1-1) = &h000000
       Buffer1(count1-1) = &h000000
       Buffer2(count1-1) = &h000000
       Buffer3(count1-1) = &h000000
       
       sendLED2
     next count1
     for count1 = 149 to 2  step -1  
       buffer0(count1) = &h020000
       Buffer1(count1) = &h000200
       Buffer2(count1) = &h020002
       Buffer3(count1) = &h020202
       buffer0(count1-1) = &h100000
       Buffer1(count1-1) = &h001000
       Buffer2(count1-1) = &h100010
       Buffer3(count1-1) = &h101010
       buffer0(count1-2) = &h300000
       Buffer1(count1-2) = &h003000
       Buffer2(count1-2) = &h300030
       Buffer3(count1-2) = &h303030
       pause 5
     
       buffer0(count1+1) = &h000000
       Buffer1(count1+1) = &h000000
       Buffer2(count1+1) = &h000000
       Buffer3(count1+1) = &h000000
       sendLED2  
     next count1
   'next loopcnt
   'for loopcnt = 1 to 2
     for count1 = 1 to 149   'Run the  LED from end to end and return
        buffer0(count1) = &h000030
       Buffer1(count1) = &h003000
       Buffer2(count1) = &h303030
       Buffer3(count1) = &h300000
       pause 5
   
       
      buffer0(count1-1) = &h000000
       Buffer1(count1-1) = &h000000
       Buffer2(count1-1) = &h000000
       Buffer3(count1-1) = &h000000
       sendLED2
     next count1
     for count1 = 149 to 0  step -1  
        buffer0(count1) = &h000030
       Buffer1(count1) = &h003000
       Buffer2(count1) = &h303030
       Buffer3(count1) = &h300000
       pause 5
       
        buffer0(count1+1) = &h000000
       Buffer1(count1+1) = &h000000
       Buffer2(count1+1) = &h000000
       Buffer3(count1+1) = &h000000
       sendLED2  
     next count1
 
     for count1 = 1 to 149   'Run the  LED from end to end and return
        buffer0(count1) = &h303000
       Buffer1(count1) = &h003030
       Buffer2(count1) = &h303030
       Buffer3(count1) = &h300030
       pause 5
   
       
        buffer0(count1-1) = &h000000
       Buffer1(count1-1) = &h000000
       Buffer2(count1-1) = &h000000
       Buffer3(count1-1) = &h000000
       sendLED2  
     next count1
     for count1 = 149 to 0  step -1  
        buffer0(count1) = &h303000
       Buffer1(count1) = &h003030
       Buffer2(count1) = &h303030
       Buffer3(count1) = &h300030
       pause 5
        buffer0(count1+1) = &h000000
       Buffer1(count1+1) = &h000000
       Buffer2(count1+1) = &h000000
       Buffer3(count1+1) = &h000000
       sendLED2  
     next count1
 
     for count1 = 1 to 149   'Run the  LED from end to end and return
        buffer0(count1) = &h301000
       Buffer1(count1) = &h003010
       Buffer2(count1) = &h300030
       Buffer3(count1) = &h303000
       pause 5
   
       
        buffer0(count1-1) = &h000000
       Buffer1(count1-1) = &h000000
       Buffer2(count1-1) = &h000000
       Buffer3(count1-1) = &h000000
       sendLED2  
     next count1
     for count1 = 149 to 0  step -1  
        buffer0(count1) = &h301000
       Buffer1(count1) = &h003010
       Buffer2(count1) = &h300030
       Buffer3(count1) = &h303000
       pause 5
        buffer0(count1+1) = &h000000
       Buffer1(count1+1) = &h000000
       Buffer2(count1+1) = &h000000
       Buffer3(count1+1) = &h000000
       sendLED2
     next count1
 
   end sub
   '*******************************FILL LEDS IST GROUP PATTERN*************************************************
   
    Sub FillLEDs
    for count = 0 To 129  'turn all leds OFF
     buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
    Next count
    sendLED
    x = 0
    indexcount = 126
    for loopcnt = 1 to 127 step 3
      if x = 0 then
       buff1 = &h300000
       buff2 = &h000030
       buff3 = &h003000
       buff4 = &h303000
   
      endif
     if x = 1 then
       buff1 = &h301000
       buff2 = &h003000
       buff3 = &h300000
       buff4 = &h300030
     
      endif
     if x = 2 then
       buff1 = &h003000
       buff2 = &h300000
       buff3 = &h003030
       buff4 = &h003000
     
      endif
        if x = 3 then
       buff1 = &h000030
       buff2 = &h300030
       buff3 = &h303000
       buff4 = &h300000

      endif
      if x = 4 then
       buff1 = &h300030
       buff2 = &h303000
       buff3 = &h301000
       buff4 = &h000030
   
      endif
       for count1 = 1 to indexcount
     
     
           buffer0(count1) = buff1
         buffer0(count1+1) = buff1
         buffer0(count1+2) = buff1
         buffer0(count1+3) = buff1
           Buffer1(count1) = buff2
         Buffer1(count1+1) = buff2
         Buffer1(count1+2) = buff2
         Buffer1(count1+3) = buff2
           Buffer2(count1) = buff3
         Buffer2(count1+1) = buff3
         Buffer2(count1+2) = buff3
         Buffer2(count1+3) = buff3
           Buffer3(count1) = buff4
         Buffer3(count1+1) = buff4
         Buffer3(count1+2) = buff4
         Buffer3(count1+3) = buff4
   
         buffer0(count1-1) = &h000000
         Buffer1(count1-1) = &h000000
         Buffer2(count1-1) = &h000000
         Buffer3(count1-1) = &h000000
   
         sendLED2
 
       next count1
          x= x + 1
       if x > 4 then
         x = 0
     
       endif
       indexcount = indexcount - 4
   
     next loopcnt

    end sub
    '*********************************FILL LEDS 3RD GROUP PATTERN************************************
      Sub FillLED3
    for count = 0 To 149
    buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
    Next count
    sendLED
    indexcount = 149
    for loopcnt = 2 to 149 step 2
       for count1 = 2 to indexcount      'Run the Red LED from end to end and return
         buffer0(count1) = &h301000
         buffer0(count1+1) = &h300000
         Buffer1(count1) = &h300030
         Buffer1(count1+1) = &h003030
         Buffer2(count1) = &h003000
         Buffer2(count1+1) = &h000030
         Buffer3(count1) = &h303030
         Buffer3(count1+1) = &h003000
         buffer0(count1-1) = &h000000
         Buffer1(count1-1) = &h000000
         Buffer2(count1-1) = &h000000
         Buffer3(count1-1) = &h000000
         sendLED2  
       next count1
       indexcount = indexcount -2
     next loopcnt
 
   sendLED
   end sub
    **************************REVERSE FILL LEDS *********************************************
   Sub REVFillLEDs
    for count = 0 To 149  'turn all leds OFF
     buffer0(count) = &h300000
     buffer1(count) = &h003000
     buffer2(count) = &h000030
     buffer3(count) = &h303000
    Next count
    sendLED
    indexcount2 = 149
    loopcnt2  = 76
    indexcount = 75
    count3 = 149
    for loopcnt = 1 to 75
       for count1 = 1 to indexcount      'Run the Red LED from end to end and return
     
        buffer0(count1) = &h000000
         Buffer1(count1) = &h000000
         Buffer2(count1) = &h000000
         Buffer3(count1) = &h000000
         buffer0(count1-1) = &h300000
         Buffer1(count1-1) = &h003000
         Buffer2(count1-1) = &h000030
         Buffer3(count1-1) = &h303000
         'sendLED2
       
     
           'Run the Red LED from end to end and return
        buffer0(count3) = &h000000
         Buffer1(count3) = &h000000
         Buffer2(count3) = &h000000
         Buffer3(count3) = &h000000
         buffer0(count3+1) = &h300000
         Buffer1(count3+1) = &h003000
         Buffer2(count3+1) = &h000030
         Buffer3(count3+1) = &h303000
       
         sendLED2  
       count3  = count3 - 1
       if count3 < loopcnt2 then
          count3 = 149
          endif
 next count1
       indexcount = indexcount -1
       loopcnt2 = loopcnt2 + 1
     next loopcnt
   
     
       
   
    for count = 0 To 149
           buffer0(count) = &h300000
           buffer1(count) = &h003000
           buffer2(count) = &h000030
           buffer3(count) = &h303000

   Next count

    sendLED
end sub
    '**************************FILL LEDS 2ND SEQUENCE ********************
     Sub FillLEDs2
    for count = 0 To 149  'turn all leds OFF
     buffer0(count) = &h000000
     buffer1(count) = &h000000
     buffer2(count) = &h000000
     buffer3(count) = &h000000
    Next count
    sendLED
   
    indexcount2 = 149
    loopcnt2  = 76
    indexcount = 75
    count3 = 149
    for loopcnt = 1 to 75
       for count1 = 1 to indexcount      'Run the Red LED from end to end and return
     
        buffer0(count1) = &h301000
         Buffer1(count1) = &h300030
         Buffer2(count1) = &h003030
         Buffer3(count1) = &h303030
         buffer0(count1-1) = &h000000
         Buffer1(count1-1) = &h000000
         Buffer2(count1-1) = &h000000
         Buffer3(count1-1) = &h000000
         'sendLED2
       
     
           'Run the Red LED from end to end and return
        buffer0(count3) = &h300000
         Buffer1(count3) = &h000030
         Buffer2(count3) = &h000030
         Buffer3(count3) = &h003000
         buffer0(count3+1) = &h000000
         Buffer1(count3+1) = &h000000
         Buffer2(count3+1) = &h000000
         Buffer3(count3+1) = &h000000
       
         sendLED2  
       count3  = count3 - 1
       if count3 < loopcnt2 then
          count3 = 149
          endif
 next count1
       indexcount = indexcount -1
       loopcnt2 = loopcnt2 + 1
 
     next loopcnt
   
     
      LEDNum = 150  
   
    for count = 0 To 149
           buffer0(count) = &h000000
           buffer1(count) = &h000000
           buffer2(count) = &h000000
           buffer3(count) = &h000000

   Next count

    sendLED
    indexcount2 = 149
    loopcnt2  = 76
    indexcount = 75
    count3 = 149
    for loopcnt = 1 to 75
       for count1 = 1 to indexcount      'Run the Red LED from end to end and return
        buffer0(count1) = &h300000
         Buffer1(count1) = &h000030
         Buffer2(count1) = &h003000
         Buffer3(count1) = &h003030
         buffer0(count1-1) = &h000000
         Buffer1(count1-1) = &h000000
         Buffer2(count1-1) = &h000000
         Buffer3(count1-1) = &h000000
             
         
         buffer0(count3) = &h301000
         Buffer1(count3) = &h300030
         Buffer2(count3) = &h303030
         Buffer3(count3) = &h003000
         buffer0(count3+1) = &h000000
         Buffer1(count3+1) = &h000000
         Buffer2(count3+1) = &h000000
         Buffer3(count3+1) = &h000000
         sendLED2  
         count3  = count3 - 1
       if count3 < loopcnt2 then
          count3 = 149
          endif
       next count1
       indexcount = indexcount -1
       loopcnt2 = loopcnt2 + 1
     next loopcnt
    end sub
   '************************************************
    sub center2
   for count = 0 To 76
     colour1(count) = 00
   
   Next count
   sendLEDrnd
   for count3 = 1 to 6
    for loopcnt = 0 to 6
         read colour1(loopcnt)
       next loopcnt
     For count1 = 226 To 443 Step 6
       count2 = 444 - count1
          bufferRND(count1) = colour1(0)
         bufferRND(count1+1) = colour1(1)
         bufferRND(count1+2) = colour1(2)
         bufferRND(count1+3) = colour1(3)
         bufferRND(count1+4) = colour1(4)
         bufferRND(count1+5) = colour1(5)
         ' buffer0(count1+6) = colour(6)
         bufferRND(count2-1) = colour1(0)
        bufferRND(count2) = colour1(1)
         bufferRND(count2+1) = colour1(2)
         bufferRND(count2+2) = colour1(3)
         bufferRND(count2+3) = colour1(4)
         bufferRND(count2+4) = colour1(5)
         ' buffer0(count2+5) = colour(6)
         sendLEDrnd
         ' pause 5
      next count1
   next count3
      for indexcount = 1 to 6
       for loopcnt = 0 to 6
         read colour1(loopcnt)
       next loopcnt
       For count1 = 449 To 225 Step -6
         bufferRND(count1-5) = colour1(0)
         bufferRND(count1-4) = colour1(1)
        bufferRND(count1-3) = colour1(2)
         bufferRND(count1-2) = colour1(3)
        bufferRND(count1-1) = colour1(4)
        bufferRND(count1) = colour1(5)
          sendLEDrnd
         'pause 5
          next count1
          for loopcnt = 0 to 6
         read colour1(loopcnt)
       next loopcnt
      For count1 = 226 To 6 Step -6
       bufferRND(count1-5) = colour1(0)
        bufferRND(count1-4) = colour1(1)
        bufferRND(count1-3) = colour1(2)
         bufferRND(count1-2) = colour1(3)
         bufferRND(count1-1) = colour1(4)
        bufferRND(count1) = colour1(5)
        sendLEDrnd
       'Pause 5
       next count1
       
   Next indexcount
     For indexcount = 1 To 6
       For loopcnt = 0 To 6
         Read colour1(loopcnt)
       Next loopcnt
       For count1 = 0 To 225 Step 6
         bufferRND(count1) = colour1(0)
        bufferRND(count1+1) = colour1(1)
         bufferRND(count1+2) = colour1(2)
        bufferRND(count1+3) = colour1(3)
         bufferRND(count1+4) = colour1(4)
         bufferRND(count1+5) = colour1(5)
          sendLEDrnd
          'pause 5
          Next count1
          For loopcnt = 0 To 6
         Read colour1(loopcnt)
       Next loopcnt
      For count1 = 225 To 443 Step 6
        bufferRND(count1) = colour1(0)
        bufferRND(count1+1) = colour1(1)
        bufferRND(count1+2) = colour1(2)
         bufferRND(count1+3) = colour1(3)
        bufferRND(count1+4) = colour1(4)
        bufferRND(count1+5) = colour1(5)
        sendLEDrnd
      ' Pause 5
       Next count1

   Next indexcount
   end sub
   
   '***************************************************************************
   sub flash1
 
 
   For count = 0 To 149 'turn all leds OFF
     buffer0(count) = &h300000
     next count
      For count = 0 To 149 'turn all leds OFF
      buffer1(count) = &h003000
  next count
   
  For count = 0 To 149 'turn all leds OFF
   
     buffer2(count) = &h000030
   
   Next count

   For count = 0 To 149 'turn all leds OFF
     buffer3(count) = &h301000
   
   Next count
   rotate1
     For count = 0 To 149'turn all leds OFF
     buffer0(count) = &h303000
     next count
      For count = 0 To 149 'turn all leds OFF
      buffer1(count) = &h003030
  next count
   
  For count = 0 To 149 'turn all leds OFF
   
     buffer2(count) = &h300030
   
   Next count

   For count = 0 To 149 'turn all leds OFF
     buffer3(count) = &h303030
   
   Next count
   rotate1
   end sub
   '************* Rotate colours between arches *****************************
sub rotate1
'----------------------------------------------
  for indexcount = 0 to 30
      For count = 0 To 149 'turn all leds OFF
     tempbuff(count) = buffer0(count)
       next count

  For count = 0 To 149 'turn all leds OFF
     buffer0(count) = buffer1(count)
       next count
   For count = 0 To 149'turn all leds OFF
     
      buffer1(count) = buffer2(count)
        next count
         For count = 0 To 149 'turn all leds OFF
     
      buffer2(count) = buffer3(count)
        next count
 
        For count = 0 To 149 'turn all leds OFF
       buffer3(count) = tempbuff(count)
        next count
     
       
   pause 400
    sendLED2
next indexcount
   for indexcount = 0 to 30
      For count = 0 To 149 'turn all leds OFF
     tempbuff(count) = buffer3(count)
       next count

  For count = 0 To 149'turn all leds OFF
     buffer3(count) = buffer2(count)
       next count
   For count = 0 To 149 'turn all leds OFF
     
      buffer2(count) = buffer1(count)
        next count
         For count = 0 To 149 'turn all leds OFF
     
      buffer1(count) = buffer0(count)
        next count
 
        For count = 0 To 149 'turn all leds OFF
       buffer0(count) = tempbuff(count)
        next count
    pause 400
    sendLED2
next indexcount
end sub
'*****************************TRANSFER LED DATA TO ALL ARRAYS***********************
sub sendLED
for x = 0 to 149
Buffer1(x) = buffer0(x)
Buffer2(x) = buffer0(x)
Buffer3(x) = buffer0(x)
next x
sendLED2
end sub
'*************************************OUTPUT ARRAY DATA TO LED STRIPS************************
sub sendLED2
Bitbang WS2812 B, GP5, LEDNum, buffer0()
Bitbang WS2812 B, GP22, LEDNum, buffer1()
Bitbang WS2812 B, GP11, LEDNum, buffer2()
Bitbang WS2812 B, GP18, LEDNum, buffer3()
end sub
'*********************************** CONVERT ARRAY DATA TO HEX RGB 888 *************************
sub sendLEDrnd

count = 0
    for i = 0 to 450 step 3
         WS2812.setcolour count, bufferRND(i), bufferRND(i+1), bufferRND(i+2)
         count = count + 1
         if count > LEDNum then
           count = 0
         endif
     next i
sendled
end sub
'****************************************************************************************
sub WS2812.setcolour(led as integer, greenness as integer, redness as integer, blueness as integer)
buffer0(led) = ((greenness and &HFF)<<16) + ((redness and &HFF)<<8) + (blueness and &HFF)

end sub

'*********************************** Hex Array Data **********************************

 '  1  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B| R  G  B| R  G  B| R G  B|
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030'   1 to 10
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030  '11 to 20
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030'  21 to 30
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030  '31 to 40
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030'  41 to 50
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030 ' 51 to 60
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030'  61 to 70
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030 ' 71 to 80
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030'  81 to 90
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030 ' 91 to 100
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030' 101 to 110
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030 '111 to 120
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030' 121 to 130
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030 '131 to 140
 Data &h000000,&h300000,&h000000,&h003000,&h000000,&h000030,&h000000,&h301000,&h000000,&h300030' 141 to 150

'  2  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h000000,&h000000,&h000000,&h000000,&h000000  '
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h000000,&h000000,&h000000,&h000000,&h000000  '
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h000000,&h000000,&h000000,&h000000,&h000000 '
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h000000,&h000000,&h000000,&h000000,&h000000 '
 Data &h303000,&h303000,&h303000,&h303000,&h303000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h000000,&h000000,&h000000,&h000000,&h000000 '
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h000000,&h000000,&h000000,&h000000,&h000000  '
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h000000,&h000000,&h000000,&h000000,&h000000 '
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h000000,&h000000,&h000000,&h000000,&h000000'  

  ' fading colours
 ' 3  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h300040,&h400040,&h400036,&h400033,&h400030,&h400026,&h400022,&h400018,&h400012,&h400008
 Data &h400000,&h400200,&h400400,&h400600,&h400800,&h401000,&h401200,&h401400,&h401600,&h401800
 Data &h402000,&h402200,&h402400,&h402600,&h402800,&h403000,&h403200,&h403400,&h403600,&h403800
 Data &h404000,&h394000,&h384000,&h374000,&h364000,&h354000,&h344000,&h334000,&h324000,&h314000  '
 Data &h304000,&h294000,&h284000,&h274000,&h264000,&h254000,&h244000,&h234000,&h224000,&h214000 '
 Data &h204000,&h194000,&h184000,&h174000,&h164000,&h154000,&h144000,&h134000,&h124000,&h114000'
 Data &h104000,&h094000,&h084000,&h074000,&h064000,&h054000,&h044000,&h034000,&h024000,&h014000 '
 Data &h004000,&h004001,&h004002,&h004003,&h004004,&h004005,&h004006,&h004007,&h004008,&h114009  '
 Data &h004010,&h004011,&h004012,&h004013,&h004014,&h004015,&h004016,&h004017,&h004017,&h004018  '
 Data &h004019,&h004020,&h004021,&h004022,&h004023,&h004024,&h004025,&h004026,&h004027,&h004028  '
 Data &h004029,&h004030,&h004031,&h004032,&h004033,&h004034,&h004035,&h004036,&h004037,&h004038  '
 Data &h003840,&h003840,&h003740,&h003640,&h003540,&h003440,&h003340,&h003240,&h003140,&h003040'
 Data &h002924,&h002826,&h002728,&h002630,&h002532,&h002434,&h002336,&h002238,&h002140,&h002040 '
 Data &h001940,&h001840,&h001740,&h001640,&h001540,&h001440,&h001340,&h001240,&h001140,&h001040 '
 Data &h000940,&h000840,&h000740,&h000640,&h000540,&h000440,&h000340,&h000240,&h000140,&h000040
 
'171 to 180
 '  red white and blue - Flag
 ' 4  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030'
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 '
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030'
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 '
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030'
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 '
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030'
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030 '
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030'  
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030 '
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000'  
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000 '
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000'
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000 '
 

'  White background
'  5 |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h010101,&h000031,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h003100,&h010101'   1 to 10
 Data &h010101,&h010101,&h010101,&h010101,&h310101,&h010101,&h010101,&h010101,&h010101,&h003131  '11 to 20
 Data &h010101,&h000031,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h003100,&h010101'  21 to 30
 Data &h010101,&h010101,&h010101,&h010101,&h310101,&h010101,&h010101,&h010101,&h010101,&h003131  '31 to 40
 Data &h010101,&h313131,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101'  41 to 50
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h313100,&h010101,&h010101,&h010101,&h010101 ' 51 to 60
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h310100,&h010101,&h010101'  61 to 70
 Data &h010101,&h310031,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101 ' 71 to 80
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h003100,&h010101,&h010101,&h010101,&h010101'  81 to 90
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h000031,&h010101 ' 91 to 100
 Data &h010101,&h010101,&h010101,&h310030,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101' 101 to 110
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101 '111 to 120
 Data &h010101,&h010101,&h010101,&h010101,&h310000,&h010101,&h010101,&h010101,&h010101,&h010101' 121 to 130
 Data &h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h010101,&h003131,&h010101,&h010101 '131 to 140
 Data &h010101,&h010101,&h010101,&h010101,&h310000,&h010101,&h010101,&h010101,&h010101,&h010101' 141 to 150


'  6  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h000000,&h300000,&h300000,&h300000'   1 to 10
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h000000,&h300000,&h300000,&h300000  '11 to 20
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h000000,&h300000,&h300000,&h300000'  21 to 30
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 ' 31 to 40
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030'  41 to 50
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 ' 51 to 60
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000'  61 to 70
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000 ' 71 to 80
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000'  81 to 90
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000 ' 91 to 100
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000' 101 to 110
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000'111 to 120
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030 '121 to 130
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030' 131 to 140
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030' 140 to 150


'  7  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h010101,&h020202,&h050505,&h101010,&h151515,&h202020,&h252525,&h303030,&h353535,&h404040  '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h010101,&h020202,&h050505,&h101010,&h151515,&h202020,&h252525,&h303030,&h353535,&h404040  '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h010100,&h020200,&h050500,&h101000,&h151500,&h202000,&h252500,&h303000,&h353500,&h404000 '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h010001,&h020002,&h050005,&h100010,&h150015,&h200020,&h250025,&h300030,&h350035,&h400040 '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h010000,&h020000,&h050000,&h100000,&h150000,&h200000,&h250000,&h300000,&h350000,&h400000 '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000'  
 Data &h000100,&h000200,&h000500,&h001000,&h001500,&h002000,&h002500,&h003000,&h003500,&h004000 '
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000' 1
 Data &h000001,&h000002,&h000005,&h000010,&h000015,&h000020,&h000025,&h000030,&h000035,&h000040
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
 '171 to 180
 
'  8  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000030,&h000030,&h000000,&h000000,&h003000,&h003000,&h000000,&h000000,&h300000,&h300000'  
 Data &h000000,&h000000,&h301000,&h301000,&h000000,&h000000,&h300030,&h300030,&h000000,&h000000  '
 Data &h000030,&h000030,&h000000,&h000000,&h003000,&h003000,&h000000,&h000000,&h300000,&h300000'  
 Data &h000000,&h000000,&h301000,&h301000,&h000000,&h000000,&h300030,&h300030,&h000000,&h000000  '
 Data &h003030,&h003030,&h000000,&h000000,&h303000,&h303000,&h000000,&h000000,&h303030,&h303030'  
 Data &h000030,&h000030,&h000000,&h000000,&h003000,&h003000,&h000000,&h000000,&h300000,&h300000'  
 Data &h000000,&h000000,&h301000,&h301000,&h000000,&h000000,&h300030,&h300030,&h000000,&h000000  '
 Data &h003030,&h003030,&h000000,&h000000,&h303000,&h303000,&h000000,&h000000,&h303030,&h303030 '
 Data &h000030,&h000030,&h000000,&h000000,&h003000,&h003000,&h000000,&h000000,&h300000,&h300000'  
 Data &h000000,&h000000,&h301000,&h301000,&h000000,&h000000,&h300030,&h300030,&h000000,&h000000  '
 Data &h003030,&h003030,&h000000,&h000000,&h303000,&h303000,&h000000,&h000000,&h303030,&h303030'  
 Data &h000030,&h000030,&h000000,&h000000,&h003000,&h003000,&h000000,&h000000,&h300000,&h300000'  
 Data &h000000,&h000000,&h301000,&h301000,&h000000,&h000000,&h300030,&h300030,&h000000,&h000000  '
 Data &h003030,&h003030,&h000000,&h000000,&h303000,&h303000,&h000000,&h000000,&h303030,&h303030 '
 Data &h003030,&h003030,&h000000,&h000000,&h303000,&h303000,&h000000,&h000000,&h303030,&h303030

'9
 Data &h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030 '
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000'
 Data &h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030 '
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000'
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030 '
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003003,&h003030,&h003030'
 Data &h303000,&h303000,&h303000,&h303000,&h303000,&h303000,&h303000,&h303000,&h303000,&h303000 '
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030'
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 '
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000'
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000'  
 Data &h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030,&h001030 '
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000'
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030 '
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030
 
'  10  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002'  
 data &h000002,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002  '
 Data &h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002'  
 data &h000002,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002  '
 Data &h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002'  
 Data &h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002'  
 data &h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002  '
 Data &h000002,&h303030,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002  '
 Data &h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002'  
 data &h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002  '
 Data &h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002 '
 Data &h000002,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002'  
 data &h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h303030,&h000002,&h000002  '
 Data &h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h303030'  
 Data &h000002,&h000002,&h303030,&h000002,&h000002,&h000002,&h000002,&h000002,&h000002,&h303030
 
'  11  |R  G  B| R G  B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R  G  B| R G  B|
 Data &h000040,&h000040,&h000040,&h000040,&h040040,&h080040,&h120040,&h140040,&h160040,&h200040  '
 Data &h250040,&h300040,&h350040,&h400040,&h400035,&h400030,&h400025,&h400020,&h400016,&h400012
 Data &h000040,&h000040,&h000040,&h000040,&h040040,&h080040,&h120040,&h140040,&h160040,&h200040  '
 Data &h250040,&h300040,&h350040,&h400040,&h400035,&h400030,&h400025,&h400020,&h400016,&h400012  '
 Data &h400008,&h400004,&h400000,&h400400,&h400800,&h401200,&h401400,&h401600,&h402000,&h402500 '
 Data &h403000,&h403500,&h404000,&h354000,&h304000,&h254000,&h204000,&h164000,&h124000,&h084000 '
 Data &h044000,&h004000,&h004005,&h004010,&h004014,&h004016,&h004020,&h004025,&h004030,&h004035  '
 Data &h004040,&h003540,&h003040,&h002540,&h002040,&h001640,&h001240,&h000840,&h000440,&h000040  '
 Data &h000040,&h000040,&h000040,&h000040,&h040040,&h080040,&h120040,&h140040,&h160040,&h200040  '
 Data &h250040,&h300040,&h350040,&h400040,&h400035,&h400030,&h400025,&h400020,&h400016,&h400012  '
 Data &h400008,&h400004,&h400000,&h400400,&h400800,&h401200,&h401400,&h401600,&h402000,&h402500 '
 Data &h403000,&h403500,&h404000,&h354000,&h304000,&h254000,&h204000,&h164000,&h124000,&h084000 '
 Data &h044000,&h004000,&h004005,&h004010,&h004014,&h004016,&h004020,&h004025,&h004030,&h004035  '
 Data &h004040,&h003540,&h003040,&h002540,&h002040,&h001640,&h001240,&h000840,&h000440,&h000040
 Data &h004040,&h003540,&h003040,&h002540,&h002040,&h001640,&h001240,&h000840,&h000440,&h000040

'   7  |R  G  B| R G B |R  G  B| R  G  B| R  G  B| R  G  B|  R  G  B|  R  G  B| R G  B| R G  B|
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000'
 Data &h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000,&h300000  
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000'  
 Data &h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000,&h003000  '
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030'  
 Data &h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030,&h000030 '
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000'  
 Data &h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000,&h301000 '
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030'  
 Data &h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030,&h003030'
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030 '
 Data &h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030,&h300030'  
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030
 Data &h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030,&h303030
 Data &h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000,&h000000
 
   '----------------------------------- integer Array data --------------------------------------------
 '18| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|
 data 30,30,00,00,30,00,00,30,30,00,30,00,30,00,00,30,00,30,00,30,00,30,30,00,00,10,30,30,10,00  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  '
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  '
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30    

 
  '18| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,30,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  

 '17
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,30,00,00,00,00,30,00,30,00,30,00,00,00,30,30,30,00,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  

 
  '18| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10

 '19
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,30,00,00,00,00,30,00,30,00,30,00,00,00,30,30,30,00,30' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20

 
  '20| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10

 '21
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,30,00,00,00,00,30,00,30,00,30,00,00,00,30,30,30,00,30' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20

 
  '22| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
  '22| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
  '22| B  G  R| B  G  R |B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R| B  G  R|    
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 1 to 10
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30  ' 11 to 20
 data 30,30,00,30,30,00,00,30,30,00,30,30,30,00,30,30,00,30,00,30,00,00,30,00,00,10,30,00,10,30
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 11 to 20
 data 30,00,00,00,00,30,00,30,00,30,00,00,00,00,30,00,30,00,30,30,00,00,30,30,30,00,30,30,30,30  ' 1 to 10



Bill
Edited 2024-02-29 10:16 by Bill.b
In the interests of the environment, this post has been constructed entirely from recycled electrons.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024