Pumpkin Patch

by Todd

Brief: While they’re pitched as simple, even small technology projects have a lot of skill and moving parts behind them. We wrote this not just to show off a bit of Hallowe’en fun, but to cast some light on what it takes for these things to happen.

These things always start so innocently.

We should carve pumpkins.

Yes, totally. It would be nice to light them up in the window.

We could use LEDs.

Sure, safer than candles, different colours, could be nice.

It would be neat to hook up Particles, make them blink or colour cycle.

We need that, but with a way to change them with your phone.

Oh like a little web server and just a mobile page?

Yes, and a sign in the window that tells people the URL, so they can discover it and play with the lights.

That was more or less the brief, and it ended up like this:

Pumpkins in action

Check out the Pumpkin Patch!

Anyone can visit denimandsteel.com/pumpkins and change the lights, but you only get the real experience by doing it at our studio window. It’s one of those ‘you gotta be there’ experiences, which we always have a soft spot for.

Across three days we stole hours here and there, travelling the usual path between an idea and something real. You learn things by looking back on that path, and even in short projects that is no less true.

The rest of this post has some technical details, and what we learned along the way.

Technical Stuff

We’ve done loads of work with Particle devices the past year and have several kicking around, so they were the natural choice as a wifi-connected micro-controller.

Tylor wired up a prototype pretty quickly, and with a bit of code written for both the device and a web server, we used Porter to test things out.


Pumpkin Prototyping

That worked, so we started coding the mobile web page. We could have used Porter in this case as well, with the Share Interface feature, but we wanted to provide more of a Hallowe’en specific experience.

Pumpkin Control

Pumpkin Lighting Control Centre

Beyond the prototype, we soldered together five mini boards with the Particle and LED, to be powered by a USB cable that would run into the back of the pumpkin.

Hardware setup

Wired Pumpkins!

With everything set up we ran into a tricky problem: the devices kept losing their wifi connection with no real pattern we could see. We tried moving the router, keeping the lids off the pumpkins, and even thinning the back wall of the pumpkins, but nothing helped.

Frustrated, we set up events on the devices to monitor when lost connections. Since Porter stores events we could look back at the overnight data and saw, to our horror, the devices were able to stay connected only for a few minutes before having to re-find their connection.

Connectivity error report

Porter's stored events showed us a lot of disconnection happening overnight. Dealbreaker territory!

First thing in the morning we rejigged our wifi setup and lo, the devices connected solidly. Whew!

This installation will only really work well at night, and over this weekend when we’re away. We wanted to know if people used it, so we added one more event for colour changes.

Once again, Porter filled in a gap: we made a custom action that watches for colour events, and emails the pumpkin owner when their specific pumpkin is interacted with.

A very clean room

Setting up the email notification action in Porter

After the weekend, we’ll download all the stored events and see which pumpkins got the most love, and which colours people chose.


Wifi is fickle

We all know this at some level, but it’s easy to forget. This is a part that we expected to ‘just work’ and it was one of the most time-consuming pieces to solve. We ended up building feedback into the UI just in case a colour change fails to complete because of this.

Real projects matter

We didn’t start this project to use Porter, but it kept proving itself useful, and flushed out minor usability and performance issues. As Porter gets ready for full launch in November, these were good to find. Testing in the abstract never tells you as much as using a tool with a real project, no matter how small.

Beyond testing, Porter not only saved us time on even a small project, but also let us have something more robust and fun without added investment.

You have more cables than you know

We needed five spare mini-USB cables, and when we started digging we had more than enough. Where do these things come from?

Fruit flies love pumpkins

These things are crazy. We’ve implemented an apple cider vinegar trap, and solemnly condemn these little guys to a drunken death.

“Anyone can do it” is a leap

The mix and depth of skill needed to bring even simple ideas to fruition is not trivial. From circuitry, soldering, coding the devices in Arduino, Node for the web server, and then the front-end HTML/CSS, there’s a lot to know to get from making an LED blink to a working thing. On top of that, we have a pre-existing website with a full complement of styles to build on, as well as a Heroku account we know well from daily use.

Being welcoming to beginners is a virtue, but too often the mastery needed to pull off even simple projects like our Pumpkin Patch is understated. And yet, projects just like these are the hook. Tools like Porter and the abundance of sample code and guidance available online do help, but beginners deserve a more realistic idea of what they’re in for when we invite their interest. When we stepped back from this small project to consider everything involved, it reminded us of how much we had to learn to pull off this ‘easy’ project.

But to help get you started, here’s the code for the Particle controller and web server components.

It’s worth it

Even a small, contained project has unknowns and obstacles to navigate. The capabilities of a platform and an idea must still contend with the reality of getting things to work, and that’s where these projects get their real character. As much as that process can frustrate, it’s part of what we love about making new things, big or small.

The aftermath

Let’s not forget that the inside of a pumpkin is a biological environment with lots going on. The pumpkins decayed a bit faster than we hoped, and a couple of the devices were exposed to moisture, mold, and who knows how many enzymes.

Particle decay!

The inside of a rotting pumpkin is not a great place for exposed electronics.

That said, they all stayed on until we unplugged them, and with a bit of cleaning we think they’ll be ready for service in whatever project comes next.