Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:18 02 May 2025 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 - SK 6812W DEVICE Command

Author Message
Hansaplast
Newbie

Joined: 13/07/2023
Location: Hong Kong
Posts: 12
Posted: 06:06am 22 Apr 2025
Copy link to clipboard 
Print this post

[Quote]
Full support for the WS2812 multi colour LED chip which can be daisy chained into long strings? really?

But how to address 200 LED's in a single line?

Any Idea or help?
Dim a%(19)=(&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000,&h00ff0000)

>Only max. 20<

 DEVICE ws2812 w, GP3, 200, a%()

This is not working correct!
Edited 2025-04-22 16:07 by Hansaplast
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7464
Posted: 07:06am 22 Apr 2025
Copy link to clipboard 
Print this post

You don't. That's the clumsy way to set up the array. :)
DIM it first then fill it using a READ loop. You can split the values over DATA statements. or, to set a single colour for the string, just assign each dimension value in the loop.

If using DATA statements you can RESTORE to a label, so you can have several sets of values.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 07:07am 22 Apr 2025
Copy link to clipboard 
Print this post

Dim a%(199)
For i=0 to 199
A%(i)=&h00ff0000
Next

And then send the array
.
PicomiteVGA PETSCII ROBOTS
 
Hansaplast
Newbie

Joined: 13/07/2023
Location: Hong Kong
Posts: 12
Posted: 07:46am 22 Apr 2025
Copy link to clipboard 
Print this post

Hello

Thanks a lot. Let me have a try
_______________________________

Dirk
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025