[{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/000/719/original/Screenshot_2024-02-25_213906.png?1708897182","metadata":{"caption":""}},{"element_type":"text","content":"\n  \n        \u003cp\u003eJust stumbled upon this again over the weekend (I'd seen it before once, but never used it). It's the\u0026nbsp;\u003cstrong\u003eRandomizer\u003c/strong\u003e service in Adafruit IO, which offers random words, colours, numbers, or entries from a list. See more \u003ca href=\"https://io.adafruit.com/services/words\" target=\"_blank\"\u003ehere\u003c/a\u003e (if you're signed in), and you access the values via MQTT or the HTTP API (instructions on the page).\u003c/p\u003e\n\u003cp\u003eAnyway, while fantasising about data (specifically how long could my list of values be in randomizer), my mind got caught in rainbow colour sequences, and here we are...\u003c/p\u003e\n\u003cp\u003eI wanted to insert a long list of items, and thought that's the perfect use for ChatGPT, monotonous lists. It's especially good at understanding simple instructions, although I usually find I need to refine my initial request/prompt.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://chat.openai.com/share/3c8c870f-3d99-4c7b-bc40-91b59087ae16\"\u003eI asked\u003c/a\u003e:\u003c/p\u003e\n\u003cp style=\"padding-left: 40px;\"\u003e\" generate me a rainbow sequence of colours, hash prefixed and comma separated. the sequence should effectively loop if repeated.\"\u003c/p\u003e\n\u003cp\u003eIt failed to intuit (I never said), that I wanted a long sequence, and instead offered me the 7 colours of the rainbow in a list.\u003c/p\u003e\n\u003cp\u003eRealising my error, of implicit \u003cem\u003eass\u003c/em\u003e\u003cspan style=\"text-decoration: underline;\"\u003eu\u003c/span\u003e\u003cem\u003eme\u003c/em\u003ed knowledge, I added an extra phrase to clarify my desire:\u003c/p\u003e\n\u003cp style=\"padding-left: 40px;\"\u003e\"generate me a rainbow sequence of colours, hash prefixed and comma separated. the sequence should effectively loop if repeated. \u003cspan style=\"text-decoration: underline;\"\u003eGive me a 100 value transition through the colour spectrum\u003c/span\u003e\u003c/p\u003e\n\u003cp\u003eAnd there we have it, a nice colour sequence, which I then increased to 256 items. Communication is key, and not easy, or at least \u003cem\u003eit is easy\u003c/em\u003e to make grave assumptions and inadvertently mess-up.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e100 Items:\u003c/strong\u003e\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"code","content":"#ff0000, #ff0f00, #ff1e00, #ff2d00, #ff3d00, #ff4c00, #ff5b00, #ff6b00, #ff7a00, #ff8900, #ff9900, #ffa800, #ffb700, #ffc600, #ffd600, #ffe500, #fff400, #f9ff00, #eaff00, #dbff00, #cbff00, #bcff00, #adff00, #9eff00, #8eff00, #7fff00, #70ff00, #60ff00, #51ff00, #42ff00, #33ff00, #23ff00, #14ff00, #05ff00, #00ff0a, #00ff19, #00ff28, #00ff38, #00ff47, #00ff56, #00ff66, #00ff75, #00ff84, #00ff93, #00ffa3, #00ffb2, #00ffc1, #00ffd1, #00ffe0, #00ffef, #00ffff, #00efff, #00e0ff, #00d1ff, #00c1ff, #00b2ff, #00a3ff, #0093ff, #0084ff, #0075ff, #0066ff, #0056ff, #0047ff, #0038ff, #0028ff, #0019ff, #000aff, #0500ff, #1400ff, #2300ff, #3200ff, #4200ff, #5100ff, #6000ff, #7000ff, #7f00ff, #8e00ff, #9e00ff, #ad00ff, #bc00ff, #cc00ff, #db00ff, #ea00ff, #f900ff, #ff00f4, #ff00e5, #ff00d6, #ff00c6, #ff00b7, #ff00a8, #ff0098, #ff0089, #ff007a, #ff006b, #ff005b, #ff004c, #ff003d, #ff002d, #ff001e, #ff000f","metadata":{"language":"auto","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003e\u003cstrong\u003e256 items:\u003c/strong\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"code","content":"#ff0000, #ff0500, #ff0b00, #ff1100, #ff1700, #ff1d00, #ff2300, #ff2900, #ff2f00, #ff3500, #ff3b00, #ff4100, #ff4700, #ff4d00, #ff5300, #ff5900, #ff5f00, #ff6500, #ff6b00, #ff7100, #ff7700, #ff7d00, #ff8300, #ff8900, #ff8f00, #ff9500, #ff9b00, #ffa100, #ffa700, #ffad00, #ffb300, #ffb900, #ffbf00, #ffc500, #ffcb00, #ffd100, #ffd700, #ffdd00, #ffe300, #ffe900, #ffef00, #fff500, #fffb00, #fdff00, #f7ff00, #f1ff00, #ebff00, #e5ff00, #dfff00, #d9ff00, #d3ff00, #cdff00, #c7ff00, #c1ff00, #bbff00, #b5ff00, #afff00, #a9ff00, #a3ff00, #9dff00, #97ff00, #91ff00, #8bff00, #85ff00, #7fff00, #79ff00, #73ff00, #6dff00, #67ff00, #61ff00, #5bff00, #55ff00, #4fff00, #49ff00, #43ff00, #3dff00, #37ff00, #31ff00, #2bff00, #25ff00, #1fff00, #19ff00, #13ff00, #0dff00, #07ff00, #01ff00, #00ff03, #00ff09, #00ff0f, #00ff15, #00ff1b, #00ff21, #00ff27, #00ff2d, #00ff33, #00ff39, #00ff3f, #00ff45, #00ff4b, #00ff51, #00ff57, #00ff5d, #00ff63, #00ff69, #00ff6f, #00ff75, #00ff7b, #00ff81, #00ff87, #00ff8d, #00ff93, #00ff99, #00ff9f, #00ffa5, #00ffab, #00ffb1, #00ffb7, #00ffbd, #00ffc3, #00ffc9, #00ffcf, #00ffd5, #00ffdb, #00ffe1, #00ffe7, #00ffed, #00fff3, #00fff9, #00ffff, #00f9ff, #00f3ff, #00edff, #00e7ff, #00e1ff, #00dbff, #00d5ff, #00cfff, #00c9ff, #00c3ff, #00bdff, #00b7ff, #00b1ff, #00abff, #00a5ff, #009fff, #0099ff, #0093ff, #008dff, #0087ff, #0081ff, #007bff, #0075ff, #006fff, #0069ff, #0063ff, #005dff, #0057ff, #0051ff, #004bff, #0045ff, #003fff, #0039ff, #0033ff, #002dff, #0027ff, #0021ff, #001bff, #0015ff, #000fff, #0009ff, #0003ff, #0100ff, #0700ff, #0d00ff, #1300ff, #1900ff, #1f00ff, #2500ff, #2b00ff, #3100ff, #3700ff, #3d00ff, #4300ff, #4900ff, #4f00ff, #5500ff, #5b00ff, #6100ff, #6700ff, #6d00ff, #7300ff, #7900ff, #7f00ff, #8500ff, #8b00ff, #9100ff, #9700ff, #9d00ff, #a300ff, #a900ff, #af00ff, #b500ff, #bb00ff, #c100ff, #c700ff, #cd00ff, #d300ff, #d900ff, #df00ff, #e500ff, #eb00ff, #f100ff, #f700ff, #fd00ff, #ff00fb, #ff00f5, #ff00ef, #ff00e9, #ff00e3, #ff00dd, #ff00d7, #ff00d1, #ff00cb, #ff00c5, #ff00bf, #ff00b9, #ff00b3, #ff00ad, #ff00a7, #ff00a1, #ff009b, #ff0095, #ff008f, #ff0089, #ff0083, #ff007d, #ff0077, #ff0071, #ff006b, #ff0065, #ff005f, #ff0059, #ff0053, #ff004d, #ff0047, #ff0041, #ff003b, #ff0035, #ff002f, #ff0029, #ff0023, #ff001d, #ff0017, #ff0011, #ff000b, #ff0005","metadata":{"language":"auto","linenums":false}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eAnd long story short, Adafruit IO Randomizer service happily let me setup a list with 256 values, and generated a random one.\u003c/p\u003e\n\u003cp\u003eIt's worth noting they change every minute, and remain in sync with any matching the same seed value.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eExtension Project - Questionably useful things\u003c/h1\u003e\n\u003cp\u003eThe last thing to add is that ChatGPT fails in many places/ways, but it's always interesting to test, so I went further and tried to get it to colour-correct the values in the list, based on the human perception of some colours being better than others, along with the issue of RGB lights having different strengths in each colour, then while writing this I also remembered I'd not clarified the rgb issue enough as the individual coloured LEDs are fine at higher brightness's.\u003c/p\u003e\n\u003cp\u003eWhat I found most interesting was after the last clarification (but the second query mentioning RGBW LEDs) it offered me colour hex values including a fourth white component, which is actually what I'd originally questioned if I'd wanted all along...\u003c/p\u003e\n\u003cp\u003eFor posterity I've included it all in collapsible sections, so I suggest you collapse them all and use the last one, but read them by all means! My questions/prompts are in bold (title of collapsible), and ChatGPT is the collapsible content:\u003c/p\u003e\n      \n\n\n\n\n\n\n","metadata":{}},{"element_type":"faq","content":" humans see more sensitivity in some areas, and some LEDs in RGBW leds are brighter than others, can you take that into account and adjust the hex values for my sequence of 100, and another of 256 transitions? \n","metadata":{"markdown":""}},{"element_type":"faq","content":" I've realised that RGBW LEDs are great at the top end of each colour led's brightness, but individually vary in brightness at lower levels of PWM, so please instead create an appropriate sequence knowing this fact. \n","metadata":{"markdown":""}}]