# The Technocolour Dreamcoat, phone-free Burning Man 2023 edition!

**URL:** <https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115>\
**Category:** Show and Tell\
**Created:** [August 15, 2023, 2:42pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115 "2023-08-15T14:42:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratkins](https://forum.electromage.com/user_avatar/forum.electromage.com/ratkins/32/3035_2.png) [@ratkins](https://forum.electromage.com/u/ratkins)\
**Post date:** [August 15, 2023, 2:43pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/1 "2023-08-15T14:43:00Z")

</div>

Thanks to @wizard’s [amazing work](https://forum.electromage.com/t/api-for-changing-patterns-in-a-playlist/3108/5) over the weekend, I’ve implemented next/previous hardware buttons and a brightness knob. I can now venture out onto the playa phone-free! Come say hello if you see me.

[/uploads/default/original/2X/4/4ce9692b976e9fc645613d7812df4cd070a95a9e.mp4](https://forum.electromage.com/uploads/default/original/2X/4/4ce9692b976e9fc645613d7812df4cd070a95a9e.mp4)

---

<div class="post-metadata">

**Author:** ![ZacharyRD](https://forum.electromage.com/user_avatar/forum.electromage.com/zacharyrd/32/124_2.png) [@ZacharyRD](https://forum.electromage.com/u/ZacharyRD)\
**Post date:** [August 15, 2023, 3:32pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/2 "2023-08-15T15:32:25Z")

</div>

This is great – I was following your ask in the other thread, but didn’t quite “get” what you were implementing and how it was going to work – are you game to contribute back to the forum more hardware build details and the code block you wrote for the beta software?

---

<div class="post-metadata">

**Author:** ![ratkins](https://forum.electromage.com/user_avatar/forum.electromage.com/ratkins/32/3035_2.png) [@ratkins](https://forum.electromage.com/u/ratkins)\
**Post date:** [August 15, 2023, 4:08pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/3 "2023-08-15T16:08:47Z")

</div>

Well, sure. Here’s the code:

```auto
export function beforeRender(delta) {
  // ...

  // enable next/forward buttons
  debounceNext(delta)
  debouncePrev(delta)
}

export var analogInputs

var DEBOUNCE_TIME = 40;

var nextBtnState;
var nextBtnTimer;

function debounceNext(delta) {
  var newState = analogInputs[2] > 0.5;
  if (newState == nextBtnState) {
    nextBtnTimer = 0;
  } else {
    nextBtnTimer += delta;
  }
  if (nextBtnTimer > DEBOUNCE_TIME) {
    nextBtnState = newState;
    if (nextBtnState) {
      sequencerNext();
    }
  }
}

var prevBtnState;
var prevBtnTimer;

function debouncePrev(delta) {
  var newState = analogInputs[1] > 0.5;
  if (newState == prevBtnState) {
    prevBtnTimer = 0;
  } else {
    prevBtnTimer += delta;
  }
  if (prevBtnTimer > DEBOUNCE_TIME) {
    prevBtnState = newState;
    if (prevBtnState) {
      sequencerPrev();
    }
  }
}

export function sequencerPrev() {
  var p = playlistGetPosition() - 1;
  p = mod(p, playlistGetLength());
  playlistSetPosition(p);
}

```

(But note in the other thread I could clean up this duplication a bit by putting the state/timer/action variables in arrays.)

This is what the control box hardware looks like:

 ![tempImageyX8mGl](https://forum.electromage.com/uploads/default/original/2X/7/7ffba378822ccb91864a9a3b55f69d3b55bc35fa.jpeg)  
 ![tempImageP6nSqh](https://forum.electromage.com/uploads/default/original/2X/b/b62c6fbf904e43534e646129af7762595ba83916.jpeg)  
 ![tempImage1T2t8O](https://forum.electromage.com/uploads/default/original/2X/4/4f43b8dc2f265fb9381dfe2931bf5fe18e0c4c01.jpeg)

I’ve basically got a little board with the buttons mounted on it, plugged in to the analogue inputs of the sensor expansion board with a bodged-up connector made out of a right-angle header socket. The board has resistors that pull the button outputs down to ground (er, not in that picture though, that’s pre-fixing them to pull the correct pins down.) The pot is connected to another analogue input.

I read the button state and call the prev/next functions as per the code above and I’ve had to modify every pattern to multiply the brightness by `analogInputs[0]` (to which the pot’s wiper is connected.) Either `rgb(r * analogInputs[0], g * analogInputs[0], b * analogInputs[0]);` or `hsv(h, s, v * analogInputs[0])`.

And that’s about it! I’m planning on doing a bigger post on my blog about the build, but that’s going to have to wait until I’m back from the Burn :).

---

<div class="post-metadata">

**Author:** ![slippers](https://forum.electromage.com/user_avatar/forum.electromage.com/slippers/32/3315_2.png) [@slippers](https://forum.electromage.com/u/slippers)\
**Post date:** [August 15, 2023, 5:00pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/4 "2023-08-15T17:00:53Z")

</div>

This is so cool! I’d love to see a bigger post about this!

---

<div class="post-metadata">

**Author:** ![hex337](https://forum.electromage.com/user_avatar/forum.electromage.com/hex337/32/2547_2.png) [@hex337](https://forum.electromage.com/u/hex337)\
**Post date:** [August 15, 2023, 5:19pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/5 "2023-08-15T17:19:04Z")

</div>

What kind of LEDs are you using? Love that they show up the way they do!

---

<div class="post-metadata">

**Author:** ![ratkins](https://forum.electromage.com/user_avatar/forum.electromage.com/ratkins/32/3035_2.png) [@ratkins](https://forum.electromage.com/u/ratkins)\
**Post date:** [August 15, 2023, 5:22pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/6 "2023-08-15T17:22:39Z")

</div>

Here’s a sneak peek, but as I said I’m going to put up a more detailed blog post when I get back:

 ![IMG_0580](https://forum.electromage.com/uploads/default/original/2X/c/ca64d7a87f908b33052eb3a7e0bad85194bddab7.jpeg)

---

<div class="post-metadata">

**Author:** ![ZacharyRD](https://forum.electromage.com/user_avatar/forum.electromage.com/zacharyrd/32/124_2.png) [@ZacharyRD](https://forum.electromage.com/u/ZacharyRD)\
**Post date:** [August 15, 2023, 5:39pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/7 "2023-08-15T17:39:03Z")

</div>

Thanks a ton @ratkins – I’d LOVE to read a full build breakdown post Burn; this is a really cool approach.

Heck, I posted in [Hey 2023 Burner ms, what are you bringing to the Playa this year? - #12 by ZacharyRD](https://forum.electromage.com/t/hey-2023-burner-ms-what-are-you-bringing-to-the-playa-this-year/3088/12) my Playa wearable for the year, and ran out of time for a full writeup of implementation details myself – but doing exactly what you have here for pattern and brightness control was one of my stretch goals that very much didn’t happen. I was trying to just use the main PB onboard button pins to change patterns, and I was getting some weird issues (it didn’t debounce properly, that caused me to cut that out of the project in the interest of time.

After Burning Man / once the code you’re running on is not Beta / once you do a full write up, I’d love to enhance that helmet to do exactly what you’ve done here; it already has a sensor expansion board.

---

<div class="post-metadata">

**Author:** ![ratkins](https://forum.electromage.com/user_avatar/forum.electromage.com/ratkins/32/3035_2.png) [@ratkins](https://forum.electromage.com/u/ratkins)\
**Post date:** [August 15, 2023, 7:27pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/8 "2023-08-15T19:27:30Z")

</div>

Note that I probably wouldn’t have used the analogue pins on the sensor board for buttons if it hadn’t been mechanically convenient, there are disadvantages. You can’t set `INPUT_PULLUP` on the sensor board’s pins, for example.

---

<div class="post-metadata">

**Author:** ![hex337](https://forum.electromage.com/user_avatar/forum.electromage.com/hex337/32/2547_2.png) [@hex337](https://forum.electromage.com/u/hex337)\
**Post date:** [August 15, 2023, 11:30pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/9 "2023-08-15T23:30:42Z")

</div>

Nice, I’m using those same pebbles for a last minute “add LEDs to a fur coat”, but no luxury of taking the whole liner out, had to hand stitch in some elastic loops and hoping that when I connect it all tonight it works.

I wasn’t gonna go this year, but so many tickets available, I couldn’t help myself. Will miss the meet up, but hope to see some of you out and about!

---

<div class="post-metadata">

**Author:** ![ratkins](https://forum.electromage.com/user_avatar/forum.electromage.com/ratkins/32/3035_2.png) [@ratkins](https://forum.electromage.com/u/ratkins)\
**Post date:** [August 16, 2023, 5:20am UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/10 "2023-08-16T05:20:10Z")

</div>

Wait, where’s the meetup?

---

<div class="post-metadata">

**Author:** ![hex337](https://forum.electromage.com/user_avatar/forum.electromage.com/hex337/32/2547_2.png) [@hex337](https://forum.electromage.com/u/hex337)\
**Post date:** [August 16, 2023, 5:07pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/11 "2023-08-16T17:07:39Z")

</div>

Thursday 9-11pm, Illuminaughty at 8:00 and G I think.

---

<div class="post-metadata">

**Author:** ![ZacharyRD](https://forum.electromage.com/user_avatar/forum.electromage.com/zacharyrd/32/124_2.png) [@ZacharyRD](https://forum.electromage.com/u/ZacharyRD)\
**Post date:** [August 16, 2023, 7:24pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/12 "2023-08-16T19:24:33Z")

</div>

I haven’t seen details about that one – @hex337 if you have more please share. There’s also this: [Burning Man LEDs are Awesome meetup](https://www.facebook.com/events/657716549534873)

---

<div class="post-metadata">

**Author:** ![wizard](https://forum.electromage.com/user_avatar/forum.electromage.com/wizard/32/4_2.png) [@wizard](https://forum.electromage.com/u/wizard)\
**Post date:** [August 16, 2023, 9:39pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/13 "2023-08-16T21:39:22Z")

</div>

The LEDs are Awesome meetup for folks not on FB:

> TUESDAY, AUGUST 29, 2023 AT 7 PM – 10 PM  
> Camp Illuminaughty, 9:15&G, Black Rock City  
> Come together to share your projects, ideas, and skill with other LED enthusiasts. Continues with a DJ party starting at 9 pm

They specifically carved out a few hours so LED folks can get together and nerd out about stuff, then follow with a party.

---

<div class="post-metadata">

**Author:** ![ZacharyRD](https://forum.electromage.com/user_avatar/forum.electromage.com/zacharyrd/32/124_2.png) [@ZacharyRD](https://forum.electromage.com/u/ZacharyRD)\
**Post date:** [August 16, 2023, 9:52pm UTC](https://forum.electromage.com/t/the-technocolour-dreamcoat-phone-free-burning-man-2023-edition/3115/14 "2023-08-16T21:52:13Z")

</div>

It’s also unfortunately during the Art Haus Ballet performance [https://www.arthausonplaya.com/](https://www.arthausonplaya.com/) which should be amazing and I have a friend playing in, or I’d be there myself.
