Avatar for Robin

Robin

Member since Jan 2017 • Last active Feb 2019
  • 39 conversations
  • 427 comments

Most recent activity

  • in Tutorials
    Avatar for Robin

    Mon 2019.02.11

    Package size:  3528  5050

    https://www.flexfireleds.com/comparison-­between-3528-leds-and-5050-leds/
    3.5mm x 2.8mm   or   5mm x 5mm


    "NeoPixel is Adafruit's brand of individually-addressable red-green-blue LED"

    https://en.wikipedia.org/wiki/Adafruit_I­ndustries


    Original thread discussion:  

    Home >> Electronics >> 'RGBW neopixel leds'
    http://forum.espruino.com/conversations/­330532/




    TypeOrderVcc
    WS2811 RGB 12v/5v
    WS2812 GBR 5v
    SK6812 [1] RGBW 5v
    APA102 BGR 5v
    ?unknown? variant [2] GRBW 5v

    Note:
       datasheet pdf files provided via AdaFruit CDN servers
    [1] RGBW NeoPixel also available in Cool White, Neutral White and Warm White
    [2] See Original Thread Discussion link above for GRBW variant sold/advertised as WS2812





    Please preserve this reference and refrain from posting to this thread.

    DM @Robin for suggested enhancements. I'll be sure to add attribution with the edit.

  • in Other Boards
    Avatar for Robin

    Sun 2019.02.10

    There is a heading and link at the bottom of the page in the link you provided in #1 above.

    See: "Other Boards"

  • Avatar for Robin

    Sat 2019.02.09

    Nicely done @allObjects

    Peppered with many good examples of accessing arrays and program flow logic - Bonus!!

    Any chance of getting a short 20 sec video of the excitement during actual game play?
    e.g. Paddles in foreground with light display in background

  • in Electronics
    Avatar for Robin

    Sat 2019.02.09

    While I would have someone with more compiler level skills answer this (I'm an end user like yourself) in detail, I am able to suggest the following:

    'Sometimes they list half a dozen part numbers in the name'

    Yes, annoying isn't it. Their description of WS2812b is an error as you found out.

    'The first color in the struct is green, that might be the reason for the strange color order'

    The beauty of C/CPP is the ability to use pointers to access items. The structure above allows for the definition of the three color items, and as you were on the right track, just needed to get to the usage part to see how that structure is implemented. Those three items therefore, can be used in any order as can be seen by:

    Using the link you provided NRFDriver in #13 above, but use the i2s_ws2812b_drive.c file

    https://bit.ly/2WRz7kt

    and now my understanding of 'C' is now in question as from line L75 those colors are bit shifted.
    uint32_t rgb_data = (p_led->green << 16) | (p_led->red << 8 ) | p_led->blue;

    Am I getting Javascript and C/CPP/C# muddled here, as I always believed the order of a structure definition didn't set the order of the data. Anyone able to clarify here?

    As you can see, the above module is for the nRF devices using I2S



    The following is for STM using I2C  hardware SPI

    @Gordon passed along this link some time ago for the Neopixel source:

    https://github.com/espruino/Espruino/blo­b/master/libs/neopixel/jswrap_neopixel.c­

    stm32_neopixelWrite()

    but the only reference searching GitHub turned up

    https://github.com/espruino/Espruino/blo­b/master/libs/wio_lte/jswrap_wio_lte.c

    L51 unsigned char rgb[] = {(unsigned char)g,(unsigned char)r,(unsigned char)b};

    which does perform a byte reorder, but why is this in the WioLTE file?    Neopixel !== GPS

    http://www.espruino.com/WioLTE
    'The Seeed Wio LTE board is an open source gateway which enable faster IoT GPS solutions'

    Is it possible there is a suitable Neopixel plug that is to fit into the I2C pin connector on that board? e.g. This board has multiple other uses than that shown?



    I was unsuccessful at locating the source file that contains how the byte order appears for
    stm32_neopixelWrite()

    My understanding is that to keep the data ordered, it is assumed that it will be RGB to keep the mental model accurate, and left up to the implementer (us) to provide the byte oder to the setup array for require("neopixel").write()

  • in Electronics
    Avatar for Robin

    Fri 2019.02.08

    Thank you @AkosLukacs for the source and image from #4 above.

    @Spocki thanks for the trio variant summary: RGBNW (natural white), RGBCW (cold white) and RGBWW (warm white)

    AkosLukacs, how did you determine that quad Uint's were needed, as the BangGood page specifies RGB+White and also indicates (while incorrect) WS2812 (tripplet Uint's), which you (array divide by three) have proven can't be - see what follows. If a S.W.A.G.'d guess, then it appears you may have gotten lucky there, even though you were led to believe you received WS2812



    Did anyone else observe the inconsistency?


    From image in #4 the output as explained is from right to left: (reversed here)

    Green : Red : Blue : Yellowish White : Bright White : RGB White

    Spec sheet SK6812 shows RGBW   which can't possibly be


    as we have #4:

    [50,0,0,0, 0,50,0,0, 0,0,50,0, 0,0,0,50, 50,50,50,50, 50,50,50,0]
       G R B W   G R B W   G R B W   G R B W­   



    Can't be these either ref: RGB WS2811 or BGR APA102

    https://cdn-shop.adafruit.com/product-fi­les/1378/WS2811.pdf
    https://cdn-shop.adafruit.com/datasheets­/APA102.pdf



    So, do we have yet another mis-represented Asian knockoff, or a spec sheet that is incorrect and we now need to search for yet another variant to contend with?

  • in Electronics
    Avatar for Robin

    Thr 2019.02.07

    'Just got a strip with RGBW WS2812B Leds'

    The above needs clarification as WS2812b are Neopixels, while RGBW are most likely SK6812 Neopixel LEDs. Subtle naming convention. Either one or the other, but not RGBW WS2812b Leds   32 vs 24

    https://cdn-shop.adafruit.com/datasheets­/WS2812.pdf
    https://cdn-shop.adafruit.com/product-fi­les/2757/p2757_SK6812RGBW_REV01.pdf


    'the neopixel library it just works'

    Well yes and no. While the Neopixel library referenced using the require instruction does work as described right out of the box illuminating with color, if and only if, the array referenced is in the correct RGB format. If true Neopixels were what was tested, then the output would have been GRB not RGB.


    'If the number of LEDs is divisible by 3, or you pad it'

    Did you mean the referenced array is three times the size of the equivalent number of Neos in the strip?


    'and create a writeRGBW method'

    What exactly will this function do? Is the intent to individually address each Neo by way of an array offset or something of the sort? 32 bit data variant?

  • in JavaScript
    Avatar for Robin

    Note: Post #19 above was started as a new thread and has a few responses there

    Home Other Boards ESP8266 Sync delay like Arduino delay function built-in

    http://forum.espruino.com/conversations/­330506/

  • in ESP8266
    Avatar for Robin

    Wed 2019.02.06

    'What's happened? I'm very stressed with this'

    Deep breath, mantra tone ummmmmmmmm, another coffee, less coffee?

    It might be that the Javascript language is the culprit. I find that this resource is a good go-to when ideas are needed:

    https://www.w3schools.com/jsref/met_win_­settimeout.asp

    I believe that Option #2 in post #2 is what you are after.



    Should that darn servo just not want to cooperate, please post that code block using the 'code' button slightly above the edit window. You won't be able to scare us with what you have so far so no need to stress about that. Converting from C to Javascript does take a knack to get the hang of, but once one gets going, it is rather easy.

Actions