DFN Happy Hour No. 34: Hey 2020… hold my beer.

Coming up Friday at 5:30 pm PST members Barb Noren (BarbMakesThings), Tod Kurt (todbot) and Carlyn Maw (carlynorama) ring in the New Year! Barb starts building a beautiful world, while Tod and Carlyn try to do some LED sparkling. Oh did we mention this was during a white supremacist insurrection attempt in D.C.? No? Thanks 2021 for getting us off to… a start.

https://www.twitch.tv/deepfriedneurons

Last Week Redux: January 1, 2021

Blog post | Video

Beverages Consumed

“Thanks for Existing!” Awards

This Week Preview

Barb

I’ve spent the last couple weeks working on the basic layout and graphics for the virtual art gallery for ART.HAPPENS on gather.town. Rather than use their default conference hall soulcrush-bluegrey graphics, I’m redoing them with a style inspired largely by 2-Minute Tabletop, but brought into the present day. So far, I’ve been focusing on backgrounds and basic reusable elements like plants, doors, and picture frames. Once I get all of those in place, I’ll branch further out for some more detailed, specific, playful elements.

I’ve spent a good amount of time in Photoshop recently, and have gotten to learn about ways to create tile-able backgrounds and creating/modifying brushes, which is quite enjoyable. Some other people are going to be working on different parts of the virtual gallery space too, which should be fun to see.

Tod

If you are like me, you play around with Neopixel / WS2812-style LEDs a lot. Normally I solder my own custom-connectors and don’t use the ones that come with the reels I buy. But since we’ve been playing around with WS2812-compatible Xmas lights, I decided to make a “Neopixel Dev Kit” for easier experimenting with different LEDs and different ways of powering them. Most LED reels come with a 3-pin JST SM socket (female) connector installed with also maybe a 2.1mm DC barrel connector to inject power (see reel picture below). They’ll also throw in a pigtail JST SM plug (male) connector to attach to your controller. So I standardized on this. The kit as shown consists of (from bottom to top):

  • 3-pin JST SM socket (female) added to weird new WS2812-compatible Xmas lights
  • Known-good USB-powered WS2812 controller from those lights, rewired with JST SM plug
  • Standard 3-pin JST SM plug to JST SM socket, with 2.1mm DC barrel connector power injector
  • 3-pin JST SM plug (male) to header pins, for breadboarding
  • Known-good normal WS2812 strip with JST SM socket
  • 5V power supply with 2.1mm DC barrel connector
  • USB power meter for seeing voltage & amps drawn by any particular setup (see example below)
  • Arduino Pro Micro clone on tiny breadboard. This is a 5V microcontroller, so no need to worry about 3.3V -> 5V data issues. And it’s cheap in case we blow it up

Overall it’s working out okay. I need to add a few “sacrificial neopixels” to the mix to make using 3.3V-based microcontrollers and maybe some breadboard screw-terminals.

Carlyn

I am the proud beneficiary of Tod’s neopixel-dev-kit as it is attached to our tree. To be honest I haven’t done much playing around with LED strips since HL1606 days. Tod began my FastLED indoctrination with Scott Marley’s excellent getting started series.

Mostly this week I have been dinking around with patterns for the trip on the tree based on Scott Marley’s examples, mainly a red-green-white tree pattern. The builtin fadetoblack() function pops to red before it goes black with many colors that have a higher R component than G or B so I tried the TwinkleFox example that comes with the Library. The twinkle Fox example requires a 16 color palette and I wrote some palette display utility code (below). Its twinkle function does not pop to red when dim if one chooses the setting to NOT “fade like an incandescent.” So I have a white sparkling on red example and a shades of white palette and candlelight colors palette… I had more planned… but whelp… you know I found white supremacist armed insurrectionists, abetted by elected officials and other insiders, terrorizing our democracy and the town I grew up in a bit distracting. Funny that.

#include <FastLED.h>



#define NUM_LEDS      200//41//16
#define LED_TYPE   WS2812//WS2812
#define COLOR_ORDER   RGB//GRB
#define DATA_PIN       10
//#define CLK_PIN       4
//#define VOLTS           5
//#define MAX_MA       1000

CRGB leds[NUM_LEDS];

uint8_t paletteIndex = 0;

CRGBPalette16 candlePalette = CRGBPalette16 (
       0x020002,
       0x020002,
       
       0xc55f04, 
       0x9e4401,
       0x431a02,
       0x8f2208,
       0x300000,
       0x716710,


       0xd22400,
       0x881801,
       0x874101,
       0x885208,

       0xFFCC33,
       0xFFCC33,
       0xCC2000,
       0xEE3300
);

CRGBPalette16 myPalette = candlePalette; //other types of palettes possible
int paletteLength = 16; //always 16 for CRGBPalette16



void setup() {
  Serial.begin(9600);
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
  FastLED.setBrightness(50);
  FastLED.setCorrection(TypicalLEDStrip); //UncorrectedColor, TypicalLEDStrip, TypicalPixelString

  delay(3000);
  for(int r=0; r < (NUM_LEDS/paletteLength); r++) {
    Serial.print("R: ");
    Serial.println(r);
    int led_offset = r*paletteLength;
    Serial.println(led_offset);
     for(int i=0; i < paletteLength; i++) {
          int l = i + led_offset;
          Serial.println(l);
          leds[l] = myPalette[i];
    }
  }
  
  FastLED.show();
}

carlyn

I make things that do stuff. The best, though, is teaching others to do the same. Founder of @crashspacela Alum of @ITP_NYU

One thought on “DFN Happy Hour No. 34: Hey 2020… hold my beer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.